I have an excel which needs to be saved as HTML file. I tried in general way to send hotkeys and save it as HTML, but after automating everything correctly, in the end Bot is still saving the file as Excel only. Because in Save as Window, Bot is giving the file name and selecting the Type as html but after clicking the the save button, the type is automatically getting changed to Excel again. is there any other alternatives to change the excel file to html file? I tried invoke code using the following code, but it didn’t work
static void Main(string args)
//Create a Workbook instance
Workbook workbook = new Workbook();
//Load an Excel sample document
//Get the first worksheet of the document
Worksheet sheet = workbook.Worksheets;
//Save the worksheet to HTML
it is showing the error as closing } is needed although everything seems to be working in VB Studio. Can anyone please resolve this issue?
If you are sure that the contents of your excel would be readable as html, I guess you can try just letting the bot save it as an excel and then just add a sequence to rename the file from ExcelFile.xlsx to ExcelFile.html
Have not tried if, but I think it might work.
// Create an instance of the class used to import/export Excel files
ExcelDocument workbook = new ExcelDocument();
// Import Excel file
// Export HTML file
workbook.easy_WriteHTMLFile("C:\\Samples\\Excel to HTML.html");