Forum Discussion
2 Replies
- Colin_McCraeCommunity HeroI'm not aware of any inbuilt functionality for doing this.
But I did find this: http://vinusumi.wordpress.com/2013/01/09/convert-xlsx-to-html-mht/
Which is a small block of vbscript which uses the Windows Excel object to do the work for you. It looks like it should work in TestComplete to me.
Hi,
The following sample shows how to save an Excel file to the HTM format:
'VBScript
Function SaveExcelToHtml
Const xlHTML = 44
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("<Excel_File>")
Set objWorksheet = objWorkbook.Worksheets("Sheet1")
objExcel.DisplayAlerts = False
objWorkbook.SaveAs "<HTML_File>", xlHTML
End Function