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

Free Support Forum - aspose.com

Issue while converting Excel file from HTML file

Hi,

We are facing an issue while converting Excel file from HTML file. I have attached "CompleteEmail_Gmail.html" file for reference. We are using "aspose-cells-8.7.1.4.jar" file in classpath.

Code snippet:

HTMLLoadOptions options = new HTMLLoadOptions(LoadFormat.HTML);

Workbook book = new Workbook(htmlFileLocation + File.separatorChar

+ htmlFileName + ".html", options);


And it is throwing error:

2017-01-02 06:01:41 java.lang.NullPointerException

2017-01-02 06:01:41 at com.aspose.cells.zafm.s(Unknown Source)

2017-01-02 06:01:41 at com.aspose.cells.zafn.a(Unknown Source)

2017-01-02 06:01:41 at com.aspose.cells.zaft.o(Unknown Source)

2017-01-02 06:01:41 at com.aspose.cells.zaft.l(Unknown Source)

2017-01-02 06:01:41 at com.aspose.cells.zafu.a(Unknown Source)

2017-01-02 06:01:41 at com.aspose.cells.Workbook.a(Unknown Source)

2017-01-02 06:01:41 at com.aspose.cells.Workbook.a(Unknown Source)

2017-01-02 06:01:41 x`Unknown Source)

2017-01-02 06:01:41 at com.avery.DataConversionUtils.generateExcelFile(DataConversionUtils.java:200)

Please look into this and update ASAP.

Hi,


Thanks for your posting and using Aspose.Cells for Java.

We are unable to open your source html file in Microsoft Excel, so this html is not excel oriented. If Microsoft Excel is not able to open it, then it means, Aspose.Cells will also not be able to open it. So before loading any html file, make sure, it gets open fine in Microsoft Excel. It is because, Aspose.Cells supports the subset of HTML which is supported by Microsoft Excel. Microsoft Excel itself cannot open every HTML file because it is not like a Web Browser, so it only supports subset of HTML. Please see the screenshot of your html when opened in Microsoft Excel 2013 for your reference.

However, we looked into your html file and found it has missing tag, so we put this tag and then it opened fine both in Microsoft Excel and Aspose.Cells. I have attached the modified html file and generated xlsx file by Aspose.Cells for your reference.

Java
HTMLLoadOptions options = new HTMLLoadOptions(LoadFormat.HTML);
Workbook book = new Workbook(dirPath + “a.html”, options);
book.save(dirPath + “a.xlsx”);

OK, thanks for the update.

Can you please let me know which version you have used as I am still getting same error with jar “aspose-cells-8.7.1.4.jar”.



Thanks
Vishal

Hi,

Thanks for using Aspose.Cells.

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

Hi Support,


I am not able to convert excel file for attach HTML file “CompleteEmail_25thJan.html”. Below error is coming:

java.lang.NullPointerException
at com.aspose.cells.Style.a(Unknown Source)
at com.aspose.cells.Style.copy(Unknown Source)
at com.aspose.cells.zagv.aa(Unknown Source)
at com.aspose.cells.zagv.z(Unknown Source)
at com.aspose.cells.zagw.a(Unknown Source)
at com.aspose.cells.zahc.o(Unknown Source)
at com.aspose.cells.zahc.l(Unknown Source)
at com.aspose.cells.zahd.a(Unknown Source)
at com.aspose.cells.zcam.a(Unknown Source)
at com.aspose.cells.zcam.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at com.avery.DataConversionUtils.generateExcelFile(DataConversionUtils.java:198)
at com.avery.DataConversionUtils.main(DataConversionUtils.java:46)


This html file is opening in Excel. I am using latest jar file “aspose-cells-17.1.4.jar” for my development.

Please check and update ASAP.

Thanks
Vishal

Hi Vishal,


Thank you for sharing the fresh sample. We have evaluated the presented scenario while using the latest version at the moment, which is Aspose.Cells for Java 17.1.6, and we are able to replicate the said issue on our side. In order to further investigate the matter, we have raised this incident as CELLSJAVA-42174. Please spare us little time for the proper analysis. In the meanwhile, we will keep you posted with updates in this regard.

Hi,


Please treat this with high priority. This issue is reported from UAT team and we are very close to deploy our changes to Production box.

Thanks
Vishal

Hi Vishal,


I am afraid, we cannot promise the release schedule for the fix unless we have thoroughly analyzed the scenario on our side. Please note, as the ticket was logged recently, it is currently pending for the analysis and is in the queue with other priority tasks. You have to spare us little time for investigation. In the meanwhile, we will keep you posted with updates in this regard.
Hi again,

Adding more to my previous response, I have requested the concerned member of the product team to schedule the analysis at earliest possible. Moreover, I can also see that the product team has started work on the aforementioned ticket. We will soon share more updates in this regard.

Hi,

Thanks for using Aspose.Cells.

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

Hi Support,


I have tested with the latest aspose API “aspose-cells-17.1.7.jar” and it was fixed for the reported file but same issue is coming for another file. I have attached that file “CompleteEmail_2ndFeb2017.html” for your reference. Please check and let me know why it is causing issue as the html file is excel oriented. This issue is coming on production box so please treat this with high priority.


Thanks
Vishal

Hi Vishal,


Thank you for your feedback and for sharing the fresh sample.

I have evaluated the scenario against Aspose.Cells for Java 17.1.7, and I am able to observe java.lang.NullPointerException at Workbook constructor while loading the provided HTML. In order to further investigate the matter, I have raised this incident as CELLSJAVA-42179 in our bug tracking system. Please spare us little time to properly analyze the case and revert back with updates in this regard.

Also this is throwing null pointer exception as below:


java.lang.NullPointerException
at com.aspose.cells.zagv.I(Unknown Source)
at com.aspose.cells.zagw.a(Unknown Source)
at com.aspose.cells.zahc.o(Unknown Source)
at com.aspose.cells.zahc.l(Unknown Source)
at com.aspose.cells.zahd.a(Unknown Source)
at com.aspose.cells.zcam.a(Unknown Source)
at com.aspose.cells.zcam.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at com.avery.DataConversionUtils.generateExcelFile(DataConversionUtils.java:214)
at com.avery.DataConversionUtils.main(DataConversionUtils.java:45)

This is not a good handling by throwing null. We are getting questions from our customers regarding this issue as same issue comes 2nd time. So please provide resolution with proper explanation of cause of the issue.

Thanks
Vishal
Hi Vishal,

vishu88in:
Also this is throwing null pointer exception as below:

java.lang.NullPointerException
at com.aspose.cells.zagv.I(Unknown Source)
at com.aspose.cells.zagw.a(Unknown Source)
at com.aspose.cells.zahc.o(Unknown Source)
at com.aspose.cells.zahc.l(Unknown Source)
at com.aspose.cells.zahd.a(Unknown Source)
at com.aspose.cells.zcam.a(Unknown Source)
at com.aspose.cells.zcam.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at com.avery.DataConversionUtils.generateExcelFile(DataConversionUtils.java:214)
at com.avery.DataConversionUtils.main(DataConversionUtils.java:45)

Thank you for sharing the stack trace. Please note, this is the same exception which I have observed while loading the file "CompleteEmail_2ndFeb2017.html" in an instance of Workbook.

vishu88in:
This is not a good handling by throwing null. We are getting questions from our customers regarding this issue as same issue comes 2nd time. So please provide resolution with proper explanation of cause of the issue.

We need to first analyze the scenario then we will be in a position to share the cause of the problem. Please spare us little time for analysis. In the meanwhile, we will keep you posted with updates in this regard.

Thank you. As this issue is coming in production box so I request you to please work on this with high priority.



Thanks
Vishal

Hi Vishal,


Thank you for writing back and for your patience with us. Please note, the aforementioned ticket already has the highest priority that a Normal Support ticket could have. Moreover, it is currently pending for analysis, and is in the queue with other priority tasks. That said, I have requested the concerned member of the product team to schedule the ticket for analysis at earliest possible and share the results along with ETA. As soon as we get any updates, we will post here for your kind reference.

Hi,


Please provide update on this.


Thanks
Vishal

Hi Vishal,


I have just shared that the aforementioned ticket is currently in the queue for analysis. We will be able to provide any updates after completing the preliminary analysis.

Hi,


This is to inform you that we are working over your issue and hopefully, we will provide you the fixed version within the next few days (2-4 days or so).

Keep in touch.

Thank you.