Cell.HtmlString is erroring out while setting the value- for a value

Hi,

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

Please download and try this fix: Aspose.Cells for .NET v7.4.0.4 and let us know your feedback.

Now For this value it is throwing index out of range. QA test & Var1good^&#4dfsdf23dfewr¥dfs¥.


Please check with this value as htmlString it is throwing Index out of range error.

Thanks,
Ankit

Hi,


I have tested the new string with v7.4.0.4, it works fine.

Here is my sample code and please find attached the output file. I do not get any error and the output file is fine.

Sample code:

Workbook workbook = new Workbook();
Worksheet worksheet1 = workbook.Worksheets[0];
Cells cells = worksheet1.Cells;
Aspose.Cells.Cell cell = cells[“A1”];
string val = “QA test & Var1good^&#4dfsdf23dfewr¥dfs¥.”;
cell.HtmlString = val;

workbook.Save(“e:\test2\HtmlStringtest.xlsx”);

If you still find the issue, kindly do paste your sample code here, we will check your issue soon.

Thank you.

Hi ,


I am trying to create an excel file which has a cell with value this with inline fonts ‘Barclays US Floating Rate Note < 5 Years Index’.

I want the resultant cell value to be ‘Barclays US FloatingRate Note < 5 Years Index’.
How to acheive it as I can not set “<” because the above value is a part of html which is getting parsed and saved in excel . ?
I am using the Aspose version v7.4.0.4.



Corporateitcompliance:
Hi ,

I am trying to create an excel file which has a cell with value this with inline fonts 'Barclays US Floating Rate Note < 5 Years Index'.

I want the resultant cell value to be 'Barclays US FloatingRate Note < 5 Years Index'.
How to acheive it as I can not set "<" because the above value is a part of html which is getting parsed and saved in excel . ?
I am using the Aspose version v7.4.0.4.



Hi,

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

We have logged your requirements inside our database against the issue id: CELLSNET-41061. We will look into your issue and help you asap.

Once, there is some update for you, we will share it with you.

Hi,

Thanks for using Aspose.Cells.

We have looked into your issue but we are unable to understand it.Could you explain your issue with more detail.

"'Barclays US Floating Rate Note < 5 Years Index".

The word in double quote need to be save in an excel cell. so we are using Aspose.cells to do the same.
As it has Inline formatting like bold and italics so we are using code
cell.HtmlString = Cell.StringValue ;

But the Thing is that the html entity < should be converted in "<" as other html tags are getting converted properly like (, ). And hence entity like <, > should come as respective symbol in Excel "<" , ">". But when I debugged I can see that < is shown as &amplt; and may be because of this its not getting converted into "<".
And Because of this issue the above mentioned sentence come as it is instead of it should be like ""'Barclays US Floating Rate Note < 5 Years Index".

I tried with simple example also . like 5 < 7
it should come as 5 < 7 ;



Hi,

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

We tried the following code, it works fine.

C#



Workbook workbook = new Workbook();

Cells cells = workbook.Worksheets[0].Cells;

cells[“A1”].HtmlString = “'Barclays US Floating Rate Note < 5 Years Index”;

Console.WriteLine(cells[“A1”].StringValue);// Barclays US Floating Rate Note < 5 Years Index


Console.WriteLine(cells[“A1”].HtmlString);


workbook.Save(@“d:\filetemp\myoutputfile.xlsx”);

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.