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"
Then from a command line, go to the folder you saved the .vbs file in and run:
XlsToCsv.vbs [sourcexlsFile].xls [destinationcsvfile].csv
https://stackoverflow.com/questions/1858195/convert-xls-to-csv-on-command-lin
dim accessApp
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("\\server\DATA\Variance.accdb")
accessApp.Run "Macro - Send report"
accessApp.Quit
CreateObject("WScript.Shell").Run "c:\windows\blat -server chmailserver -f ""VarianceReport@crouse.org"" -to ""richlemmermann@crouse.org,christophernoel@crouse.org"" -subject ""Variance Report"" -body ""Report from Automation"" -attach ""\\server\DATA\Variance.pdf""", 0, True'
set accessApp = nothing