Skip to content

Instantly share code, notes, and snippets.

@gtallen1187
Created December 6, 2013 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtallen1187/7833377 to your computer and use it in GitHub Desktop.
Save gtallen1187/7833377 to your computer and use it in GitHub Desktop.
if WScript.Arguments.Count < 2 Then
WScript.Echo "Error! Please specify the source path and the destination. Usage: XlsToCsv SourcePath.xls Destination.csv"
Wscript.Quit
End If
Dim oExcel
Set oExcel = CreateObject("Excel.Application")
Dim oBook
Set oBook = oExcel.Workbooks.Open(Wscript.Arguments.Item(0))
oBook.SaveAs WScript.Arguments.Item(1), 6
oBook.Close False
oExcel.Quit
WScript.Echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment