Missing Image when converting from HTML to EXCEL format

Hi,


I trying out a simple java program to convert HTML file into EXCEL format using Aspose.Cells API. The HTML file simply includes an image in a table. But the generated EXCEL file does not have the image in it as the HTML does when viewed in a web browser. Can someone have a look for me what went wrong? Thank you very much!

Attached is a zip file with the HTML file, the Java code, and the converted EXCEL file in it.

-fastPitch

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to replicate this issue using the code provided by you and with your source html file. The image does not get created inside the output excel file.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will share it with you asap.

This issue has been logged as

  • CELLSJAVA-41554 - Missing Image when converting from HTML to EXCEL format

Hi,

Before the issue is resolved, would you be able to suggest a workaround? I mean is there any change I can made into the HTML file that could make conversion to generate the image in excel fine? Thanks.

-fastPitch

Hi fastPitch,


Please note, the ticket logged earlier as CELLSJAVA-41554 is currently pending for analysis and is in the queue with other priority tasks. Unless we have thoroughly analyzed the scenario, we may not be able to suggest a workaround for this situation. That said, we have requested the concerned member of the product team to schedule the ticket for investigation, and share a workaround for the time being, if possible. As soon as we get further updates, we will post here for your kind reference.

Hi,

Thanks for using Aspose.Cells.

We are afraid, we do not have any workaround to suggest you which could make your HTML conversion to generate the image in excel fine.

However, we are fixing this issue and it should be fixed in about November 20, 2015. Once the fix is available for you, we will let you know asap.

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSJAVA-41554 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Hi,


Please try our latest version/ fix: Aspose.Cells for Java v8.6.1.6 (attached)

We have fixed your issue “CELLSJAVA-41554” now.

Let us know your feedback.

Thank you.

Hi,

I tried out the new API using the previous html file. But the image is still not shown. Different from last time, I got a box with text "This image cannot currently be displayed" in my excel file. It seems that the generated excel is referring an external source of the image which it could not find, rather than having the image embeded. Can you please embed the image into excel? Thanks.

-fastPitch

Hi,


I have tested your scenario/ case a bit using latest version/fix: v8.6.1.6. Well, this is due to the fact that your underlying image in your HTML file is also not shown, see the screen shots taken when viewing your HTML in the browser or in MS Word:
http://prntscr.com/94349d
http://prntscr.com/9434eg

So, it is correct behavior and the output Excel file is fine, you may also confirm this by opening your template HTML file into Ms Excel and save it as MS Excel Workbook (.xlsx) file, you will see that the image is shown similar way (blank picture/box).

Thank you.

Hi,

On my pc, I have the image file put in the same folder as the html file, so the image does show on the html. But the converted xlsx file does not show image, as I described in the previous email. Can you please test again with a image (which I did not provide you in the orginal attachment). Thanks.

-fastPitch

Hi,

I did some more testing with a different html. This time, the html was generated by aspose from an excel, and I tried to use aspose to convert it back to excel. If you look into the source of the attached html, you see the image reference as

and the converted excel does not show the image. But strangely, when I changed SRC to lowercase and became

Then I do get the image shown on the generated excel.

Furthermore , if I put src attribute after HEIGHT and WIDTH attributes, then I get the image regardless of the tag SRC being made lower case or upper case.

Can you please have a look at that too. Thanks.

P.S. please save the attached txt file as html file. I changed it to txt so that I can upload it.

Hi,


Thanks for providing further details.

Well, Aspose.Cells follows MS Excel standards and specifications when rendering or importing HTML files. Aspose.Cells supports to import and render rather MS Excel oriented HTMLs (these are not conventional/common HTML files). Could you check your issue by manually opening your template HTML file into MS Excel if you see the image fine there, and then save it as MS Excel Workbook (.xlsx) file. If you see different results in MS Excel than what is shown by Aspose.Cells, kindly do provide us a simple template HTML and image file etc., we will check it soon.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-41554) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.