473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# Extending Excel

I've written a couple C# apps, but this question is beyond anything I've done. A friend
called me and asked me if I could help, and while I can help with some of the C# stuff,
the infrastructure is where I have no experience.

Problem statement:

An extension to an Excel spreadsheet written in C#

The extension shall pop up a form and the user interacts with that form

Upon clicking an "Apply" button, or something along these lines, the extension will reach
out and manipulate the Excel spreadsheet in some appropriate fashion. There is currently
issues about whether at this point it changes the spreadsheet and closes the C# extension
window, or allows the user to continue. However, an "undo" is probably not required.

During the interactions, the extension will read values from the spreadsheet, present them
to the user and/or perform computations involving them.

I have some idea how I'd accomplish parts of this using ActiveX and ATL (I'm an MFC
expert) but the desire here is to use C# (more palatable than VB). I have no idea what
the C# equivalent of ActiveX looks like, or even how to start such a project. An
alternative is to write a WinForms app that can be launched from a spreadsheet and
effectively "take as a parameter" some reference that allows it access to the spreadsheet
that launched it.

Suggestions welcome.
joe
Joseph M. Newcomer [MVP]
email: ne******@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Apr 25 '07 #1
1 1775
Joe,

Have you taken a look at the Visual Studio Tools for Office (VSTO)? It
should give you a pretty good foundation from which to start.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Joseph M. Newcomer" <ne******@flounder.comwrote in message
news:07********************************@4ax.com...
I've written a couple C# apps, but this question is beyond anything I've
done. A friend
called me and asked me if I could help, and while I can help with some of
the C# stuff,
the infrastructure is where I have no experience.

Problem statement:

An extension to an Excel spreadsheet written in C#

The extension shall pop up a form and the user interacts with that form

Upon clicking an "Apply" button, or something along these lines, the
extension will reach
out and manipulate the Excel spreadsheet in some appropriate fashion.
There is currently
issues about whether at this point it changes the spreadsheet and closes
the C# extension
window, or allows the user to continue. However, an "undo" is probably
not required.

During the interactions, the extension will read values from the
spreadsheet, present them
to the user and/or perform computations involving them.

I have some idea how I'd accomplish parts of this using ActiveX and ATL
(I'm an MFC
expert) but the desire here is to use C# (more palatable than VB). I have
no idea what
the C# equivalent of ActiveX looks like, or even how to start such a
project. An
alternative is to write a WinForms app that can be launched from a
spreadsheet and
effectively "take as a parameter" some reference that allows it access to
the spreadsheet
that launched it.

Suggestions welcome.
joe
Joseph M. Newcomer [MVP]
email: ne******@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

Apr 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

75
by: David MacQuigg | last post by:
Seems like we need a simple way to extend Python syntax that doesn't break existing syntax or clash with any other syntax in Python, is easy to type, easy to read, and is clearly distinct from the...
4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
1
by: Richard Townsend | last post by:
In the "Extending and Embedding" part of the Python documentation: section 5.4 "Extending Embedded Python" - it describes how to use a Python extension module from Python that is embedded in a C...
4
by: Matt | last post by:
Hi, I've been thinking about how to do this, but can't think of a solution. I have a class that is derived from System.Web.UI.WebControls.DataGrid which works a treat, but I'd like to extend...
3
by: Flip | last post by:
I'm looking at the O'Reilly Programming C# book and I have a question about extending and combining interfaces syntax. It just looks a bit odd to me, the two syntaxes look identical, but how does...
5
by: vbgunz | last post by:
Hello everyone. I own two books. Learning Python and Python in a nutshell. When cross referencing the two books to try and clarify the ideas behind extending methods and delegates, this is where...
4
by: Ian Richardson | last post by:
Hi, The function I've put together below is a rough idea to extend a SELECT list, starting from: <body> <form name="bambam"> <select id="fred"> <option value="1">1</option> <option...
3
by: katis | last post by:
Hi all :) Is it posible in xsd to change only minOccurs value of element in complex type by extending this type? The problem I'm trying to solve is this: I have two complex types -...
3
by: Janwillem | last post by:
I want to make numerical functions that can be called from python. I am programming in pascal the last few decades so I had a look at "python for delphi" (P4D). The demo09 gives as example ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.