I want to run excel macro via bash command Like: cscript fileformat.vbs I got the Error every time.
"C:\xampp\htdocs\magento\readcsvitem\fileformat.vbs(4, 48) Microsoft VBScript compilation error: Expected ')' "
Sub siddfinal1()
' siddfinal1 Macro
' Read Item format
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\xampp\htdocs\magento\readcsvitem\csvitem\CmCSVExport-final.csv", _
Destination:=Range("$A$1"))
.Name = "CmCSVExport-final"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
ActiveWorkbook.SaveAs Filename:="C:\xampp\htdocs\magento\readcsvitem\csvitem\Book1.csv", _
FileFormat:=xlCSV, CreateBackup:=False
End Sub