ipavlo
asked on
VB.NET - Convert xls to csv
Trying to use VB.NET to convert excel files to csv.
Code below -
Dim xlBook As Excel.Workbook
xlBook = GetObject("C:\excelstore\b ook1.xls")
 xlBook.SaveAs(Filename:="c :\TEST.csv ", FileFormat:="CSV")
When I run this I get a Com Exception error
Using VS 2005 and Excel 2003
Code below -
Dim xlBook As Excel.Workbook
xlBook = GetObject("C:\excelstore\b
 xlBook.SaveAs(Filename:="c
When I run this I get a Com Exception error
Using VS 2005 and Excel 2003
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What Imports did you use for this?
I'm trying to do this in a SSIS Script Task, which allows you to write VB.NET to achieve certain things.
Is it possible to do this on a server that does not have Excel installed?
Thanks,
Pete
I'm trying to do this in a SSIS Script Task, which allows you to write VB.NET to achieve certain things.
Is it possible to do this on a server that does not have Excel installed?
Thanks,
Pete
ASKER
For an update I did not have the interop references on a clean install and had to download them from -
http://download.microsoft.com/download/c/4/8/c4813cc0-a4d4-4bb4-b486-9cbd56f38235/oxppia.exe
and browse to them from the project
Thanks again :-)
Pavlo