I also need to call an .NET app from Excel, and so far it's looking
kind of scary. I'm not expecting anyone to walk me all the way
through it, but I was hoping someone could reassure me that what
I am trying to do is doable (and hopefully not impossibly hard).
What I want is to give our customers the ability, from their own
Excel VBA code, to instantiate a .NET object that we provide, and
call the object's methods, passing data back and forth. That's
it! The .NET object will not modify the Excel worksheets or UI in
any way; it will do things outside of Excel, and then tell the VBA
code what it did. Basically I think I am talking about an Excel
add-in of some sort, but the details just aren't clear to me.
The important thing is that this isn't for in-house use, it's to
give to customers. So setup should be as simple as possible
(something a user without admin privileges can install as easily
as a regular Excel add-in). And it needs to work on as wide a
range of machine configurations as possible. All we want to assume
is the .NET Framework 2.0 or higher, and some version of Excel.
We don't want any 3rd party software involved. We don't want to
put anything in the GAC (the application directory is fine). We
don't want to assume that there are PIAs on the user's machine.
(.NET programs that don't use PIAs can still open and manipulate
Excel files through late binding, and I am hoping something like
that will be possible with .NET add-ins). What we really want is
for our customer to unzip a directory, click on something to install
the add-in, and go!
Finally, if possible I'd like to write this using VB 2008 Express.
I can go to Pro if necessary, but if I can stick with Express that
would be better. (I may eventually need to hand the project off
to someone who doesn't have Pro).
Anyway, the project is still in a preliminary stage, but I've been
reading about application add-ins and VSTO and whatnot for a while.
The thing is, it all seems to be addressed much higher than the
"Hello World" type of functionality I'm after. So what I'd really
like is to know, going into this, is whether what I want to do is
doable as described above, and if not where the roadblocks are,
and what's required to get around them. Any comments or links will
be most gratefully appreciated!
Post by Scott M.If it's done properly, it will work every time. Going to a 3rd party
component will only make the process more complicated.
-Scott
Post by f***@gemboxsoftware.comUsing Excel Automation is most common way to do it but it has many
issues and often results with application not working on somebody
elses machine. I advice you to use GemBox.Spreadsheet component. It's
easy to use and has free version which you can try on smaller files.
http://www.gemboxsoftware.com/GBSpreadsheet.htm
--
John Brock
***@panix.com