Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Excel file to .csv

Status
Not open for further replies.

jordnlvr

Programmer
Jul 17, 2001
4
US
Anyone have a clue as to how I can convert a .xls file into a .csv file? Using Asp.NET, VS.NET, vb and IIS on Win2k.
 
Well, presumably the excel file resides on the web server? If it does, and you have the Excel application also installed on the web server, then you can just use the Excel COM object library to do this, from your web app.



Mark [openup]
 
Well, do you know any Excel VBA? If you don't, then I suggest you use the macro recorder in Excel to record you opening a file and saving it to a certain path as CSV. Then have a look at the code the macro has created.

Once you've done that, you add a reference to the COM Excel object in your .net app, and use its Workbooks collection and Workbook object to manipulate the file in the same way as the macro code does.



Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top