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

Free Support Forum - aspose.com

Issue while Embed HTML data into Excel Sheet through ASPOSE JAVA

Hi Sir,

I am facing issue while embedding the html data into Excel sheet using HTMLLoadOptions
(Here I have data in of a table in my html file

ABC

100

Current Period: 12-16

Date:10-MAR-2017 10:35:37

) In the generated output only ABC is displaying and remaining values
1. 100
2. Current Period: 12-16
3. Date:10-MAR-2017 10:35:37
are not displaying in the excel output.
4.

test

font color is also not applying for the data in header

for the data “test”.


output: Please see attached images

Please Help me regarding this very quick
Thanks in advance.


Below is the code snippet i am using

Java Code

HTMLLoadOptions options = new HTMLLoadOptions(LoadFormat.HTML);
Workbook book = new Workbook(“D:\backup\sampleTest.html”, options);
book.save(“D:\backup\output.xlsx”, SaveFormat.XLSX);

input file :- Html Data for sampleTest.html file is:

RTF Template
.c0 {height: 41.616pt;}
.c1 {width:100.0%;background-color: #ffffff;}
.c2 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 5.4pt;margin-right: 4.599pt;}
.c3 {font-family: ‘Arial’;font-size: 9.0pt;color: #000000;}
.c4 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 5.4pt;margin-right: 10.349pt;}
.c5 {margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.6pt;margin-right: 0.599pt;width: 532.8pt;border-collapse: collapse;}
.c6 {margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 6.0pt;margin-right: 6.0pt;}
.c7 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 6.0pt;margin-right: 6.0pt;}
.c8 {height: 36.15pt;}
.c9 {border-width: 0.5pt;border-color: #000000;border-style: solid;width:5.876%;background-color: #ffffff;}
.c10 {border-width: 0.5pt;border-color: #000000;border-style: solid;width:5.885%;background-color: #ffffff;}
.c11 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 1.099pt;}
.c12 {font-family: ‘Arial’;font-size: 9.0pt;color: #000000;text-decoration: underline;}
.c13 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 1.0pt;}
.c14 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.849pt;}
.c15 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.75pt;}
.c16 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.649pt;}
.c17 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.5pt;}
.c18 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.399pt;}
.c19 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.299pt;}
.c20 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 1.149pt;}
.c21 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 1.049pt;}
.c22 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.95pt;}
.c23 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.799pt;}
.c24 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.7pt;}
.c25 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.6pt;}
.c26 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.45pt;}
.c27 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.349pt;}
.c28 {line-height: 10.404pt;margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 0.25pt;}
.c29 {margin-top: 0.0pt;margin-bottom: 0.0pt;margin-left: 6.0pt;width: 576.0pt;border-collapse: collapse;}

test

ABC

100

Current Period: 12-16

Date:10-MAR-2017 10:35:37

Hi,


Thanks for your posting and using Aspose.Cells.

We converted your html file into excel using MS-Excel and Aspose.Cells API with the following code and found this issue. Your source html is not rightly converted to excel file by Aspose.Cells.

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 let you know asap.

This issue has been logged as

  • CELLSJAVA-42218 - Html is not rightly converted to excel file

I have attached the source html, output excel file by MS-Excel and output excel file by Aspose.Cells for a reference.

Java
Workbook wb = new Workbook(dirPath + “source.html”);
wb.save(dirPath + “output-aspose.cells.xlsx”);

Hi,

Thanks for using Aspose.Cells.

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

Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix: Aspose.Cells for Java v17.3.10 and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-42218) have been fixed in Aspose.Cells for Java 17.4.0.


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