Free Support Forum - aspose.com

Aspose.Cells Html to Excel conversion not showing images

Hello Aspose Team,
we are using Aspose.Cells for .net v20.6.0.
when we try to do html to Excel using Aspose the images are not showing up in the Excel file.
the code which we are using is like this
using (MemoryStream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(bgresult)))
{
HtmlLoadOptions lo = new HtmlLoadOptions(LoadFormat.Html);

// Create workbook object from the html using load options
Workbook wb = new Workbook(stream, lo);

// Auto fit rows and columns of first worksheet
Worksheet ws = wb.Worksheets[0];
ws.Name = sheetName;
ws.AutoFitRows();
ws.AutoFitColumns();

PageSetup pageSetup = ws.PageSetup;

//Setting current date and current time at the central header
//and changing the font of the header

pageSetup.SetHeader(1, string.Format("&\"Times New Roman,Bold\"Title: Test"));


// Save the workbook in xlsx format
wb.Save(filename, Aspose.Cells.SaveFormat.Xlsx);

}
2020-09-03_14-42-29.png (22.8 KB)SourceFile.zip (488 Bytes)

@kumar.penigalapati,
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-47584 - Aspose.Cells Html to Excel conversion not showing images
1 Like

Thanks Ahsan Iqbal for the update.

do you have any interim solution that we could try mean time ? like embedding the image or something ?
Thanks.

@kumar.penigalapati,
I am afraid that as this issue is logged too recently, therefore, no analysis is done yet. You may please wait until it is analyzed and some fix or interim solution (if possible) is available for sharing.

Hi Ahsan Iqbal
is there any update on this issue ?
appreciate your response.
Thanks.

@kumar.penigalapati,
We are gathering information about this issue and will get back to you soon.

@kumar.penigalapati,

We are working over your issue and hopefully will provide you the fixed version in the next week.

Thank you so much Ahsan Iqbal…
eagerly waiting for the update :smile:

@kumar.penigalapati,

Your issue has been resolved and we will provide you the fixed version (in this week) after performing QA and incorporating other enhancements and fixes.

Keep in touch.

@kumar.penigalapati,

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

Your issue should be fixed in it.

Let us know your feedback.

Thank you so much Ahsan Iqbal
I will try the fix today.

@kumar.penigalapati,

Please take your time to evaluate the new fix. Hopefully, it will fix your issue.

Ahsan Iqbal,
Thank you for the Fix, its working now i can see the images in excel file.
but one thing i observed was that the images are not positioned correctly and they are blocking some of the content in the sheets.
we have to move the images to see the content behind the images.
do you know if this is something you observed ? or can look at it.
Thank you for you looking into this issue.

Also one more thing do you have any timeframe where you will update the Nuget Pacakges ? so i can get the latest from Nuget rather from the dll you provided ?

@kumar.penigalapati,
We have observed the issue and logged your concerns with the ticket for further analysis. Next release via NuGet package manager is expected in a couple of days.

1 Like

The issues you have found earlier (filed as CELLSNET-47584) have been fixed in Aspose.Cells for .NET v20.10. This message was posted using Bugs notification tool by Amjad_Sahi. You may also get the version @ Nuget repos. (https://www.nuget.org/packages/Aspose.Cells/20.10.0).

1 Like

Thank you Ahsan Iqbal.

Ahsan Iqbal,
the fix kind of works when we use the dll from console app.
but when we use the same dll in asp.net web application then we are not seeing the images in exported excel file.
the code is same as the initial post which we started with.
the same code when we run it in console App we are able to see the images, but not in web application.
can you help us with this.
Thanks.

@kumar.penigalapati,
I have tested the scenario in a test ASP.NET application but could not observe any issue as the images are properly displayed in the output Excel file. Could you please share your simplified runnable solution with us for testing?

Ahsan Iqbal,
I have attached the zip file.
Thank you.
WebApplication7.zip (8.2 MB)