@monir.aittahar,
As Ahsan Iqbal told you that Aspose.Cells follows Ms Excel standards and specifications in rendering Excel to HTML file format, so by default it will create folder containing the resource files against worksheets in the workbook. But you may still choose any of the following options to cope with it:
-
Use MHtml file format as an output file format from Excel workbooks. It will generate single output file without any folders/sub-folders for resource files.
-
Try to export every worksheet (in the workbook) to single HTML and then group these individual HTMLs to one (final) HTML by yourselves via e.g some tag control or using your own code. In a loop, you may set active for each sheet and then render separate HTML file (based on every worksheet) via Aspose.Cells APIs. Please note, when exporting every worksheet to separate HTML, you would need to export image as base64 format (you will use HtmlSaveOptions class here) otherwise it will create folders. See the sample code for your reference:
e.g
Sample code:
//Load your sample workbook
Workbook wb = new Workbook(“e:\test2\Book1.xlsx”);
//Specify HtmlSaveOptions
//Export image as bytes (base 64) as inline images
//Export active worksheet only
HtmlSaveOptions opts = new HtmlSaveOptions();
opts.ExportImagesAsBase64 = true;
opts.ExportActiveWorksheetOnly = true;//You may activate one sheet at a time.
//Save the workbook in HTML format with above HtmlSaveOptions
wb.Save(“e:\test2\out1.html”, opts);
Hope, this helps a bit.