We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Styles and content missing when converting worksheet to HTML/images

Hi,

When converting an Excel worksheet to HTML or images, I noticed some styles and content missing in the output.

Code:

        var workbook = new Workbook(@".\test.xlsx");
        var sheet = workbook.Worksheets[0];

        var imageOrPrintOptions = new ImageOrPrintOptions()
        {
            ImageType = ImageType.Emf,
            OnlyArea = false,
            TextRenderingHint = TextRenderingHint.ClearTypeGridFit,
            OnePagePerSheet = false,
        };
        sheet.PageSetup.PrintArea = "D6:CE71";
        sheet.PageSetup.LeftMargin =
            sheet.PageSetup.RightMargin = sheet.PageSetup.TopMargin = sheet.PageSetup.BottomMargin = sheet.PageSetup.HeaderMargin = sheet.PageSetup.FooterMargin = 0;
        new SheetRender(sheet, imageOrPrintOptions).ToImage(0, @".\out.emf");

        var htmlSaveOptions = new HtmlSaveOptions
        {
            ExportHiddenWorksheet = false,
            HiddenColDisplayType = HtmlHiddenColDisplayType.Remove,
            HiddenRowDisplayType = HtmlHiddenRowDisplayType.Remove,
            ExportActiveWorksheetOnly = true
        };

        sheet.Workbook.Save(@".\out.html", htmlSaveOptions);

I can see the arrows and colours are missing in the HTML output, and the arrows are also missing in the image output.

I’ve attached my test files and a screenshot for your reference. Could you please take a look?

test.zip (217.1 KB)
image.png (112.7 KB)

Thanks,

@ServerSide527,
This issue is reproduced and logged in our database for investigation and a fix. You will be notified automatically once any update is ready to share.

This issue is logged as:
CELLSNET-47480-Styles and content missing when converting worksheet to HTML/images

@ServerSide527,

Please try our latest version/fix: Aspose.Cells for .NET v20.7.2 (attached)
Aspose.Cells20.7.2 For .Net2_AuthenticodeSigned.Zip (5.4 MB)
Aspose.Cells20.7.2 For .Net4.0.Zip (5.4 MB)

We have fixed worksheet to image issue in it. Regarding Excel to HTML issue, we will continue to work on it.

Let us know your feedback.

@ServerSide527,

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

Your issue (regarding Sheet to image and Excel to HTML) should be fixed in it.

Let us know your feedback.
Aspose.Cells20.7.6 For .Net2_AuthenticodeSigned.Zip (5.4 MB)
Aspose.Cells20.7.6 For .Net4.0.Zip (5.4 MB)

The issues you have found earlier (filed as CELLSNET-47480) have been fixed in Aspose.Cells for .NET v20.8. This message was posted using Bugs notification tool by Amjad_Sahi