Opening an XLS file

  • Thread starter Thread starter Pete Vickers
  • Start date Start date
P

Pete Vickers

Hi,
I am using Excel as a com object in VB.Net - anyone know how I can open an
xls file please.

Research seems to give me Axspreadsheet1.Workbooks.Open() but that doesn't
exist.

I can use the activesheet and copy/paste enter values in cells etc, but how
do I open a file and load the spreadsheet

thanks

Pete
 
Hi,
I am using Excel as a com object in VB.Net - anyone know how I can open an
xls file please.

Research seems to give me Axspreadsheet1.Workbooks.Open() but that doesn't
exist.

I can use the activesheet and copy/paste enter values in cells etc, but how
do I open a file and load the spreadsheet

thanks

Pete

Not sure if it is applicable in your case, but I use the Microsoft
Excel ODBC Driver to open and read worksheets with SQLlike SELECT
statements.
 
Are you trying to read the data out of a spreadsheet, or are you trying to
manipulate the data *in* the spreadsheet?

Robin S.
 
¤ Hi,
¤ I am using Excel as a com object in VB.Net - anyone know how I can open an
¤ xls file please.
¤
¤ Research seems to give me Axspreadsheet1.Workbooks.Open() but that doesn't
¤ exist.
¤
¤ I can use the activesheet and copy/paste enter values in cells etc, but how
¤ do I open a file and load the spreadsheet

See if the following gets you started:

How to automate Microsoft Excel from Visual Basic .NET
http://support.microsoft.com/kb/301982

How To Automate Excel from Visual Basic .NET to Fill or to Obtain Data in a Range by Using Arrays
http://support.microsoft.com/kb/302094


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top