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

Free Support Forum - aspose.com

Convert html to excel using Aspose.Cells_8.7.0- formating issue

Hi, there,



I tried to use Aspose.Cells_8.7.0 to convert my html formatted excel file to real excel file, and the format seems to have lots of issues. Can you help me to resolve the issue? We have many excel files formatted using html that need to be converted on the server side, before rendering to IE browser.



Please see attachment for a sample html formatted excel. I have rename it to .txt, you can change it to .html for the original file name.



Thanks in advance,

Eric

Hi Eric,


Thank you for sharing the sample.

I have used the latest version of Aspose.Cells for .NET 8.7.1.3 and following piece of code to convert your provided HTML to XLSX format. Could you please check the attached resultant spreadsheet and highlight the problematic areas, if any? This will help us segregate the issue while logging them for further review.

C#

Workbook workbook = new Workbook(dir + “sample.html”, new HTMLLoadOptions() );
workbook.Save(dir + “output.xlsx”);

Babar,



Thank you very much for your quick reply. Please see attachment for comparison. By opening my original html file using excel 2010 and comparing with the output, you can see the difference clearly. Two issues I can see at this point.



1. the border disappeared.

2. Line break is not correct, for example {4. TYPE OF SUBMISSION} has all the rows in a single row after conversion.



Thanks,

Eric

Hi Eric,


Thank you for providing the comparison and pointing out the issues. I have logged both mentioned issues in our bug tracking for further investigation, where ticket details are as follow.

  • CELLSNET-44311: Border are lost while exporting HTML to spreadsheet format
  • CELLSNET-44312: Line breaks are lost while exporting HTML to spreadsheet format

Please spare us little time to properly analyze these scenarios to get back with updates in this regard.

Thank you very much Babar. I look forward to hearing from your team.

Thanks,
Eric

Hi Eric,


Please note, we will share the results here for your reference (along with estimated time frame for the fix, if possible) as soon as we have completed the preliminary analysis of the aforementioned tickets.

Hi,

Thanks for using Aspose.Cells.

It is to inform you that both of your issues (CELLSNET-44311, CELLSNET-44312) should be fixed before May 02, 2016.

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your following issues.

  • CELLSNET-44311 - Borders are lost while importing HTML and exporting to spreadsheet
  • CELLSNET-44312 - Line breaks are lost while importing HTML and exporting to spreadsheet

We will soon provide the fix after performing QA and including other enhancements and fixes.

The issues you have found earlier (filed as CELLSNET-44312;CELLSNET-44311) have been fixed in this update.


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

Hi,

Thanks for using Aspose.Cells.

Please download and use the latest version:
Aspose.Cells for .NET 8.8.0.

Please check the following information related to your issues.

1) Adds HTMLLoadOptions.DeleteRedundantSpaces property.

Indicates whether to delete redundant spaces when the text wraps lines using
tag.

2) The code for CELLSNET-44311 and CELLSNET-44312 is as follows:

C#

HTMLLoadOptions options = new HTMLLoadOptions();
options.DeleteRedundantSpaces = true;
Workbook workbook = new Workbook(“sample.html”, options);
workbook.Save(“out.xlsx”);