Apply FreezePanes to a worksheet and see it in exported Html

Hi there,

I am using Aspose.Cells versions 23.2.0.
I am creating a workbook with one worksheet, a few cells in it and freezing panes in a specific row and column.
Afterwards I am exporting that workbook to an html using the following code:

var htmlOptions = new HtmlSaveOptions
    {
    ExportImagesAsBase64 = true,
    ExportPrintAreaOnly = true,
    ExportHiddenWorksheet = false,
    ExcludeUnusedStyles = true,
    ExportActiveWorksheetOnly = true,
    Encoding = Encoding.UTF8
    };

    ```
                // export HTML -> for preview
                using var html = new MemoryStream();
                _workbook?.Save(html, htmlOptions);
    ```

Freezing Panes:

var cellToFreeze = ws.Cells[rowIndexToFreeze, columnIndexToFreeze];var formerActiveCell = ws.ActiveCell;
cellToFreeze?.Worksheet.FreezePanes(rowIndexToFreeze, columnIndexToFreeze, rowIndexToFreeze + 1, columnIndexToFreeze + 1);
ws.ActiveCell = formerActiveCell;

The worksheet freezes it’s pane in the row and column that I set, but in the exported html there is no change.

My question is:
Is there a way that there will be a freeze pane also in the exported html?

Thanks in advanced,

Shlomi

@shlomi.z,

Yes, freezepanes feature would be lost in the output HTML when rendering from Excel file. This is same with MS Excel. Please open a new workbook into MS Excel manually, add your data/contents and then apply Freeze Panes at your desired location in the sheet. Now save it as “Web Page” (MS Excel will also prompt you that some features would be lost when rendering to HTML). Close the workbook. Now open your generated HTML file into some browser and you will see similar result as generated by Aspose.Cells APIs.

Should you have further queries or comments, feel free to write us back.