How to get tab name for single sheet in HTML


#1

Hi Team,

I am converting HTML for xlsx files.
When there is file with multiple tabs aspose is creating different subfolder with css and html file for each sheet…so that I am able to see tab names in generated html…

But when I am trying to convert single sheet xlsx file into html, I am not able to get different folder and tab names in html…

this is the code samplet I am using for html conversion…

HtmlSaveOptions options = new HtmlSaveOptions();
options.Encoding = System.Text.Encoding.UTF8;
options.ExportImagesAsBase64 = true;
options.ExportGridLines = true;
options.ExportSimilarBorderStyle = true;
options.ExportBogusRowData = true;
options.ExcludeUnusedStyles = true;
options.ExportHiddenWorksheet = true;

please find attached screenshot for your reference…

Pictures.zip (5.4 KB)


#2

@kotharishrey,

Thanks for your query.

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46479 - Tab name not available when single sheet workbook converted to Html

#3

@kotharishrey,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-46479”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.


#4

@kotharishrey.

Please try our latest version/fix: Aspose.Cells for .NET v18.11.6 (attached)

Your issue should be fixed in it.

There are some tips for you, see the details below:

  1. We add HtmlSaveOptions.ExportSingleTab property which indicates whether exporting the single tab when the file only has one worksheet in the workbook. The default value is false.

  2. The sample .NET code is as follows:
    e.g
    Sample code:

     Workbook wb = new Workbook(filePath + "a.xlsx");
    
     HtmlSaveOptions options = new HtmlSaveOptions();
    
     options.ExportSingleTab = true;
    
     wb.Save(filePath + "out.html", options);
    

Let us know your feedback.
Aspose.Cells18.11.6 For .Net2_AuthenticodeSigned.Zip (4.7 MB)
Aspose.Cells18.11.6 For .Net4.0.Zip (4.7 MB)


#5

Thanks for your help…My problem is solved with this latest version


#6

@kotharishrey,

You are welcome.

Good to know that your issue is sorted out. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.