Hi,
Just wondering when you build a Project with VSTO (excel) do you have to pass assembilies with it for it to work correctly
Reason for asking is that i was accessing SQL Server data, displaying it in Ms Excel using a Host Combo control and some text boxes. When I tried to save it and tried to work with it from a different path while the Visual studio was closed it didn't even allow me to access anything.
It seems just a snapshot of the Excel and I can't access or manipulate anything with it.
My question is once its compiled do i have to pass the assembilies with it to work or what other options do i have
I need to send this excel file to different users and we are not even sure whether the users would have what version of excel.
Any ideas

Assembilies for VSTO files
Hank2
Thanks for your replies Both Cindy and David.
I understand that I can't work this around like this. The only thing which I need to do is to have an admin select some combos and then saved it, send it to different users and once those users would fill in specific fields and admin get it back get the data back to SQL Server.
I was trying to use VSTO because I thought at first that it will work but when I realized that once the project is created the host control in excel files won't accessible by simply opening the file. In my case the users won't receive any other file other then excel. There will not be any .Net framework or anything like that, lets just say we can't really control those partners.
Any idea how should i get around with this
These are the options which I think might work, Suggestions would be appreciated.
OPTION 1: I was thinking that I make a program to export the data from SQL Server into XML. Import that XML through .Net into excel and then populate worksheet with controls using that XML. Once it has been sent to users and I get it back again import the data into XML or directly put it into SQL Server table.
OPTION2: Try to use VBA to get the data from SQL Server into Excel and then show it in combos. send the file and once return would save it back to sql server. (Ofcourse I still don't know whether you can access SQL Server from excel using VBA )
OPTION3: Get the data from Excel put it in a hidden sheet and then Vlookup the combos, Once the file is received back saved the data back to SQL Server.
Which option you think I choose and Why
Thanks
Supes
SamUNVA
Hi Supes
OK, thinking about alternatives...
MS doesn't really support coding for multiple versions. It can be done, but you should then design and compile any code that should function "everywhere" with a reference to the *oldest* version of the application (Excel 2000 for example).
OR you need to program using late-binding (still designing/testing with the oldest version).
Given your scenario, may feeling is you may need (want) a "two-tiered" solution: the part that's distributed should be VBA code IN the Excel workbook you distribute. Again, design/test in the oldest possible version to avoid using functionality not available in oder versions.
The rest could also be in the workbook as VBA, be held in a (managed or unmanaged) COM Addin, or even be VSTO, although that could be tricky to manage when the Excel file is returned.
Caroline Wise
I think you can use choose your first option if you are fine with visual studio develoments, cos if you want to automate an other similiar project one day, you will do it easily. And use xml file is a good idea cos there is xml appropriate methods and you can use data for anything else as well.
But the fact is if you are not allowed to install the .net framework on computers where excel file is, you will need to manage excel files through the network and manage connections then.
I dont know enough with vba if you can access sql server, i guess yes.
srinivasintouch
are you creating an application.Excel object with excel using PIA interop assemblies
I'm working with access and these assemblies, and i can tell u that you need to use different assemblies version whether it's office 2003 or office 2002. There is PIA interop assemblies for office 2003 and 2002. And you have to make different project for each.
You should have open a workbook and a whorsheet as well to add data to the file, i think.
If that can help u
david
Jon Rauschenberger
Thank you David. Though I'll wait for more Opinions before proceeding with the solution.
Many thanks
Gabriel Méndez
If you aren't sure which version of Excel users would have, then VSTO isn't an ideal solution. VSTO can run only with certain types of Office 2003 - but it does have to be Excel 2003