HTML to Excel Conversion using Aspose.cell


#1

Continuing the discussion from Excel not generating from HTML file:

Hi,

I am generating the HTML to Excel file using aspose-cells-17.1.7.jar.
But at run time an error is occurring and blank excel file is generating.
Please provide a solution so that i can generate the excel file with full data without upgrade the aspose-cells-17.1.7.jar

NOTE : Input HTML file is attached for reference
Thanks,
Pankaj Jain


#2

@pankajadeptia,

Thanks for providing us some details.

We could not find your attached HTML file. Please attach your template HTML file here (you may zip it and attach it here or upload to any third party service (e.g dropbox, Google drive, etc.) and share the Download link here. We will check it soon.

Thank you.


#3

I also tried the aspose-cells-17.3.7.jar file to generate the Excel from HTML. But, the generated excel file have approx half data loss than input HTML file. I have attached the input HTML, gnerated excel file using aspose-cells-17.3.7.jar also.

Please provide the solution so that i can generate the excel with complete data using aspose-cells-17.3.7.jar.

CompleteEmail.zip (4.6 KB)


#4

@pankajadeptia,

Thanks for the template HTML file.

We have already logged a ticket for your issue in our database. This issue has been logged as

CELLSJAVA-42332 - Aspose.Cells is not able to convert the HTML file correctly while MS-Excel is able to convert it properly
Java

Workbook wb = new Workbook(dirPath + "CompleteEmail.html");
wb.save(dirPath + CellsHelper.getVersion() + "-ByCells.xlsx"); 

Once we have an update on it, we will let you know.

Thank you.


#5

@pankajadeptia,

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

Thank you.


#6

@pankajadeptia

Please download and try the following fix and let us know your feedback. It fixes CELLSJAVA-42332.


#7

Thank for providing the latest library. I test the v17.7.7 and found it resolve our few issues.
But, we are facing one more issue while converting the HTML to excel.
Issues we are facing are

  1. Minor data loss
  2. Merge the data of two separate key-value section in single cell. It creates the problem to parse the data of key-value section separately.

NOTE : Input files, output files issues.zip (208.0 KB)
and screenshots are attached for reference.

Thanks


#8

@pankajadeptia

Thanks for using Aspose APIs.

We were able to observe this issue and logged it in our database for investigation and for a fix.

This issue has been logged as

  • CELLSJAVA-42363 - HTML to Excel conversion is not good and caused data loss and merged cells errors

#9

Hi Support team,

  1. As we have tested our previous issue ( CELLSJAVA-42332. ) using Aspose.Cells for Java v17.7.7 and we found that issue is still exist and we are getting the given below error msg :

java.lang.NullPointerException
at com.aspose.cells.zagm.a(Unknown Source)
at com.aspose.cells.zagm.b(Unknown Source)
at com.aspose.cells.zagn.a(Unknown Source)
at com.aspose.cells.zagt.o(Unknown Source)
at com.aspose.cells.zagt.l(Unknown Source)
at com.aspose.cells.zagu.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
So, we can not treat this issue as resolved.

  1. We are still not able to generate the xls file and error message is diaplaying

NOTE :
i) Input HTML files are attached for reference.
ii) In attachment file 1.1 and 1.2 are related to issue no.- 1 ( CELLSJAVA-42332)
iii) In attachment file 2.1 and 2.2 are related to issue no. - 2

As CELLSJAVA-42332 is not resolved for a long time and our production work is affected very badly because of this issue.
Please provide the solution for this on high priorityAspose Support.zip (34.2 KB)


#11

@pankajadeptia

Please upload your zip file again as we are unable to download your file.

i.e.

Aspose Support.zip


#12

Aspose Support.zip (34.2 KB)
Please find the attachment again. It contains the input HTML files which can not convert in xls using AsposeCells 17.7.7 jar file


#13

@pankajadeptia

It seems, you error messages are not related to exceptions but they are related to data loss, merged cells. I have already logged such an issue as

  • CELLSJAVA-42363 - HTML to Excel conversion is not good and caused data loss and merged cells errors

We tested your files and none of them threw any exception except one.

1.1 CompleteEmail.html
1.2 CompleteEmail.html
2.1 CompleteEmail.html <<<<<<<<< Only this threw exception
2.2 CompleteEmail.html

Here are the converted files for your reference.
converted-files.zip (89.8 KB)

This issue has been logged as

  • CELLSJAVA-42365 - Loading “2.1 CompleteEmail.html” in Workbook object throws NullPointerException

Java

Workbook wb = new Workbook(dirPath + "2.1 CompleteEmail.html");

Exception:

Aspose.Cells for Java v17.7.7
Exception in thread "main" java.lang.NullPointerException
	at com.aspose.cells.zagm.a(Unknown Source)
	at com.aspose.cells.zagm.b(Unknown Source)
	at com.aspose.cells.zagn.a(Unknown Source)
	at com.aspose.cells.zagt.o(Unknown Source)
	at com.aspose.cells.zagt.l(Unknown Source)
	at com.aspose.cells.zagu.a(Unknown Source)
	at com.aspose.cells.zagu.a(Unknown Source)
	at com.aspose.cells.Workbook.a(Unknown Source)
	at com.aspose.cells.Workbook.<init>(Unknown Source)
	at ClsAsposeCells.f1(ClsAsposeCells.java:32)
	at ClsAsposeCells.main(ClsAsposeCells.java:15)

#14

@pankajadeptia

After further investigation, we have found another issue which is logged as

  • CELLSJAVA-42366 - Saving “2.2 CompleteEmail.html” to Xlsx format generates corrupt file

Java

Workbook wb = new Workbook(dirPath + "2.2 CompleteEmail.html");
wb.save(dirPath + "out2.2.xlsx");

#15

The issues you have found earlier (filed as CELLSJAVA-42332) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi


#16

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


#17

Hi ,

Thanks for providing the updated jar 17.8. We have used this on our production and found that there are issues in library also.
We are providing the all input files along-with list. Please look into this on high priorityaspose support 21_08_2017.zip (68.7 KB)


#18

@pankajadeptia

We will look into this issue in detail and update you asap.


#19

Hi Shakeel,

As you know that we have already purchase the license and it is deployed on one of our customer and running into their production environment. @Pankaj has already share the details with you and we are still facing issue. The issues still not resolved yet. Now our Client is raising this concern that this issue is pending from very long time and it is getting blocker for them. So now we can’t wait for long time and we need solution in quickly manner. So please provided update on this ASAP.

Thanks,
Vishal


#20

@vishal.sinha.adeptia

We are afraid, these bugs are complex as we stated earlier. It is because, you are converting HTML to Excel.

Here are two types of conversions.

  • Excel > HTML
  • HTML > Excel

The first type of conversion is easier because Aspose.Cells mainly deals with Excel files.

The second type of conversion is difficult because Aspose.Cells do not mainly deal with HTML files.

This is the reason, your bugs will take time to be fixed. Thanks for your understanding.


#21

Hi Shakeel,

There are so many conversion that ASPOSE allow and as you know our requirements is for HTML > Excel and for this functionality we are using ASPOSE API. This thread is running from a long time and this issue is coming in production environment so we can’t wait for such a long time. Please let me know when you guys can give update on this as I need to give a time to higher management regarding update of this issue. So at high priority please provide us a time line.

Thanks,
Vishal