Opening Excel file

nightowl4642002

New member
Joined
Aug 27, 2006
Messages
3
Programming Experience
Beginner
i am very new to VB...just started actually with the visual studio 2005 express...i am trying to set a button from my main form to open a already created excel file that i have. can anyone help me on either the coding to do this or if there is an easier way.
 
What exactly do you mean by "opening"? VB.NET has no in-built support for the XLS file format, so you can't just open one and read it like a text file. You can read the binary data it contains, but unless you know how to interpret the format that's not much use. You can automate an instance of the Excel application, but that requires Excel to be installed. If you know your users will have Excel installed then that's OK, but otherwise it's useless. You can also use ADO.NET to access the data in the file as though it was a database. Finally, you could get a third-party component that does understand the XLS binary format. Once you've established exactly what it is that you want to do with the file and its contents, then we can advise on the best way to go about it.
 
opening excel

thanks for the info...i already have the excel file made and am trying to create a program that will install with the excel file in it. I know the users who will be using it will have excel. the VB part is just to make it shareware so they cant just have open access to it forever. though i did get a reply back that i could use the process and run it thru there and that seems to be working...thanks for the reply
 
I was just bringing up the fact that it is nice when someone finds their own answer and posts it here along with the thread. I have already got the function I need. I was just bustin your chops a little. :)
 
Back
Top