windows - Convert XLS to CSV on command line -


How can I convert an XLS file to a CSV file on the Windows Command Line?

The machine is installed Microsoft Office 2000. I'm opening OpenOffice to install if it is not possible to use Microsoft Office.

Open Notepad, create a file called XlsToCsv.vbs and paste it into:

  if WScript.Arguments.Count & lt; 2 then WScript.Echo "error! Please specify the source path and destination. Usage: XlsToCsv SourcePath.xls Destination.csv" Wscript.Quit End if Dim oExcel set oExcel = CreateObject ("Excel.Application") Omback set oBook = OXL . Workbook Open (WSSAgroups.itm (0)) OBack. Saveable wscriptAgargement.itm (1), 6th oak Close oexcel.quite WScript.Echo "Done"  

Then from a command line, go to the folder that you saved and run the .vbs file:

 < Code> XlsToCsv.vbs [sourcexlsFile] .xls [destinationcsvfile] .csv  

For this you need to be installed on the machine.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -