I have 10 sheets in my excel and i want to export those to individual html file. AlsoI need a single HTML file without the tab bar at the bottom. Even hidden it creates all the worksheets in a sub-directory. I need a single HTML file with no sub-directory or extra files with the one sheet that is visible. Thanks in advance.
See the following sample code for your requirements for your reference:
e.g.
Sample code:
Workbook workbook = new Workbook("f:\\files\\Book1.xlsx");
WorksheetCollection worksheetCollection = workbook.getWorksheets();
int worksheetCount = worksheetCollection.getCount();
HtmlSaveOptions options = new HtmlSaveOptions();
for (int i = 0; i < worksheetCount; i++) {
worksheetCollection.setActiveSheetIndex(i);
options = new HtmlSaveOptions();
options.setExportActiveWorksheetOnly(true);
workbook.save("f:\\files\\out_" + i + ".html", options);
}
Hope, this helps a bit.
Good to know that the suggested code segment works for your needs. Feel free to write us back if you further queries or comments.