EDN Admin
Well-known member
Hi,
I am writing a vbscript to convert an excel file (.xlsx) to webpage format (.html). Below is script that I use to test with. The script convert the file fine. However, the workbooks style did not get export (background color, border, etc.). Any advises on this issue are greatly appreciated.
Thanks,
colsoh
######################################Dim objExcel, objWorkbook
Dim strFileToBeConvert, strFileConverted
Const xlHtml = 44
strFileToBeConvert = Wscript.Arguments(0)
strConvertedFile = Wscript.Arguments(1)
Creat excel application object
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(strFileToBeConvert)
objExcel.Visible = False
objExcel.DisplayAlerts = False
objWorkbook.SaveAs strConvertedFile, xlHtml, true
Clean up
objWorkbook.Close
objExcel.Quit
WScript.Quit
############################################
View the full article
I am writing a vbscript to convert an excel file (.xlsx) to webpage format (.html). Below is script that I use to test with. The script convert the file fine. However, the workbooks style did not get export (background color, border, etc.). Any advises on this issue are greatly appreciated.
Thanks,
colsoh
######################################Dim objExcel, objWorkbook
Dim strFileToBeConvert, strFileConverted
Const xlHtml = 44
strFileToBeConvert = Wscript.Arguments(0)
strConvertedFile = Wscript.Arguments(1)
Creat excel application object
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(strFileToBeConvert)
objExcel.Visible = False
objExcel.DisplayAlerts = False
objWorkbook.SaveAs strConvertedFile, xlHtml, true
Clean up
objWorkbook.Close
objExcel.Quit
WScript.Quit
############################################
View the full article