Hello folks,
We have a CSV file that has HTML content with inline CSS that is causing issues when we get Range.Value for a given range of a Worksheet.
Due to this, we cannot replace the content of the CSV file for the given range.
You can find the file inthe zip file final.zip (650 Bytes).
It works as expected when the single quotes in from the HTML are removed.
Doesn’t work:
<div data-wrapper=""true"" style=""font-size:9pt;font-family:'Segoe UI','Helvetica Neue',sans-serif;"">
<div>Anderson to Cummins, 1 run
Walks across his stumps as Anderson drags his length back, takes a deflection behind square </div>
</div>"
Works:
<div data-wrapper=""true"" style=""font-size:9pt;font-family:Segoe UI,Helvetica Neue,sans-serif;"">
<div>Anderson to Cummins, 1 run
Walks across his stumps as Anderson drags his length back, takes a deflection behind square </div>
</div>"
Below Code returns different Results if the single quotes are present or not
var range = this.Workbook.Worksheets[sheetIndex].Cells.CreateRange(cellAddress);
range.Value = replacementText;
When Single Quotes are present in the HTML, it returns a lot of null values.
range.Value
{object[2, 21]}
[0, 0]: "1-11111111111"
[0, 1]: {1/15/1993 7:11:00 PM}
[0, 2]: {1/15/1993 7:11:00 PM}
[0, 3]: 123
[0, 4]: 123
[0, 5]: 402629
[0, 6]: "N3148595"
[0, 7]: null
[0, 8]: "$500 stuff stuff stuff stuff stuff"
[0, 9]: "\"<div data-wrapper=\"\"true\"\" style=\"\"font-size:9pt;font-family:'Segoe UI'"
[0, 10]: "Helvetica Neue"
[0, 11]: "sans-serif;\"\">"
[0, 12]: null
[0, 13]: null
[0, 14]: null
[0, 15]: null
[0, 16]: null
[0, 17]: null
[0, 18]: null
[0, 19]: null
[0, 20]: null
[1, 0]: "<div>Anderson to Cummins"
[1, 1]: " 1 run"
[1, 2]: null
[1, 3]: null
[1, 4]: null
[1, 5]: null
[1, 6]: null
[1, 7]: null
[1, 8]: null
[1, 9]: null
[1, 10]: null
[1, 11]: null
[1, 12]: null
[1, 13]: null
[1, 14]: null
[1, 15]: null
[1, 16]: null
[1, 17]: null
[1, 18]: null
[1, 19]: null
[1, 20]: null
Aspose.Cells Version - 23.6.0
Is this a known issue or is there a workaround for this issue?