Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14126

Microsoft VBScript compilation error: Unterminated string constant at (1,13)

$
0
0

I'm getting error (1, 13) Microsoft VBScript compilation error: Unterminated string constant. what is the mistake I have done, what is the mistake with the quotes

vbscript="""if WScript.Arguments.Count < 3 Then    WScript.Echo "Error! Please specify the source path, destination path and sheet name. Usage: XlsToCsv SourcePath.xls Destination.csv and sheet name"    Wscript.QuitEnd Ifcsv_format = 6Set objFSO = CreateObject("Scripting.FileSystemObject")src_file = WScript.Arguments(0)dest_file = WScript.Arguments(1)sheet_name = WScript.Arguments(2)Set objExcel  = CreateObject("Excel.Application")Set objWorkbook  = objExcel.Workbooks.Open(src_file)Set objWorksheet  = objWorkbook.Worksheets(sheet_name)objWorksheet.SaveAs dest_file, csv_formatobjWorkbook.Close FalseobjExcel.Quit""";f = open("ExcelToCsv.vbs","w")f.write(vbscript.encode("utf-8"))f.close()

Viewing all articles
Browse latest Browse all 14126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>