HTML Tags are terminating a cells contents

The attached document will not properly convert to XLSX.

the cell “Abstract Text Field 1” cuts off at "(MetS)."

the following tag seems to break it. I do not know why. The code below is what I am doing at the simplest to try to get this to work with no success.

var options = new HTMLLoadOptions(LoadFormat.Html);
var wb = new Workbook(fileNameIn, options);
var ws = wb.Worksheets[0];
ws.Cells.StandardHeight = 16;
ws.Cells.Style.HorizontalAlignment = TextAlignmentType.Top;
var style = ws.Cells.Rows[1].Style;
style.Font.IsBold = true;
var sf = new StyleFlag();
sf.FontBold = true;
ws.Cells.Rows[0].ApplyStyle(style,sf );
wb.Save(fileNameOut, SaveFormat.Xlsx);

Hi Jason,


Thank you for sharing the sample.

I have evaluated the presented scenario while using the following piece of code against the latest available version of Aspose.Cells for .NET 16.12.5 (attached). I am afraid, I am not able to see any problem with the contents of the cell F2. Please review the attached resultant spreadsheet and share snapshots of the problem, if any.

Actually you are seeing the error. in the original attachment (report.xls) cell F2 has FAR More data. open it in Excel and double click the cell to see all the data.

the last line of that cell is (Conclusions:Skipping breakfast has no discernable effect on body weight, most of nutrients intake and metabolic parameters.)

if you look at the report.xls in a text editor you’ll see it is an HTML file, rename it to .html and open it in a browser to see the expected results.

Thanks for looking at this. in the mean time I have written a regular expression to strip all HTML from the cells but I really need Carriage returns and BOLD

Hi Jason,


Thank you for the clarification. Let me share what I understand, just to confirm that we are on same page. Please correct me if my understanding of this scenario is not correct. I have checked the input sample (report.xls) in Excel application, and I can see 4 lines of data in cell F2 (also shown in attached snapshot). However, when converting this file to XLSX, only one line of data is retained and all others are trimmed. I have logged this incident as CELLSNET-45033 in our bug tracking system for further analysis and correction. Please spare us little time to properly evaluate the case and revert back with updates in this regard.

Yes, you are correct. I really need all lines of data. it seems to fail on
tags


Kindest Regards,
Jason

Hi Jason,


Thank you for the confirmation. I have shared your concerns at the aforementioned ticket. As soon as we receive any updates from the product team, we will post here for your kind reference.

actually its a

tag that breaks the cell.

another note.
if my HTML string has THIS IS SOME TEST THIS IS MORE TEXT
the entire cell is converted to bold, not just the text inside the strong tag.
same goes for hyperlines visitfoo.com MORE TEXT
the entire cell is converted to a hyper link, not just inside the tag.

I am not sure how to deal with this.

Hi Jason,


Thank you for writing back. I have updated the comments on the ticket CELLSNET-45033 for product team’s review. Regarding your recently shared concerns, please check the following details.

Thank you. If I notice any other inconsistencies with imports I will post them.


Hi Jason,


Thank you for writing back. We humbly request you to post distinct problems in separate threads for easy management and tracking of your requests.

Hi,


This is to inform you that we have fixed your issues (logged earlier as “CELLSNET-45035” and “CELLSNET-45036”). We will soon provide the fix after performing QA and incorporating other enhancements and fixes.

Once the fix is available for public use, we will share the Download link here.

Thank you.

Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.1.4 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.1.4 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.

It fixes the following issues

  • CELLSNET-45036 - Contents after tag are trimmed while importing HTML and converting to XLSX
  • CELLSNET-45035 - Entire cell contents become bold when part of it is in between tags

Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.1.8 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.1.8 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.

It fixes the following issue.

  • CELLSNET-45033 - Cell contents are trimmed while importing HTML

The issues you have found earlier (filed as CELLSNET-45036;CELLSNET-45035;CELLSNET-45033) have been fixed in Aspose.Cells for .NET 17.2.0.


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