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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert .xls to .csv from a .vbs file

Status
Not open for further replies.

SlakeB

MIS
Jun 15, 2005
40
US
I have an excel document. The formating in it is not important, so I want to convert it to a .csv file (to make it easier to make changes to it from a .vbs file). I thought that I might be able to just rename it with a .csv extension, but that didn't work. When I opened the file in a text editor it was in HTML format(??). Has anyone come across this before, or know a solution?
 
Have a look at the SaveAs method in the Excel VBA help.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
In excel, select File->Save As then in the save dialog box, click the type dropdown and choose CSV.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Using Excel2003 you can do a 'Save as' and save it as type CSV.

-If it ain't broke, break it and make it better.
 
I want to perform the procedure from a .vbs file - sorry for not clarifying. I don't want to have to go into excel to make the change.
 
In that case, do as PHV recommended and look at the help for the SaveAs method. It will be in vba, but the conversion from vba to vbs is relatively trivial.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top