Hi,
Hi,
Thanks for your posting and using Aspose.Cells.
Please use the following code.
C#
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
string cellValue1 = ““Barclays Capital Inc.” and “Barclays US Floating Rate Note < 5 Years Index” are trademarks of Barclays Bank PLC and have been licensed for use for certain purposes by BlackRock Institutional Trust Company, N.A. (“BTC”). iShares® is a registered trademark of BTC.”;
string cellValue2 = “one is < two”;
Aspose.Cells.Cell cellA1 = worksheet.Cells[“A1”];
Aspose.Cells.Cell cellA2 = worksheet.Cells[“A2”];
cellA1.HtmlString = cellValue1;//cellvalue1 has been encoded.
cellA2.HtmlString = System.Web.HttpUtility.HtmlEncode(cellValue2);
workbook.Save(“d:\filetemp\dest.xls”);
Hi Shakeel Faiz,
Hi Lakshmi,
Hi,
Thanks for your posting and using Aspose.Cells.
If you want input < as the cell value not html tag, please encode it as “<”
If we get ‘<’ when parsing html string and can get ‘>’ after ‘>’, we think it’s not standard html string and can process it fine.
And we did the following tests in IE with a simple html file:
a)If " one is < two " is input, " one is < two " is displayed.
b)If " one is <two " is input, " one is " is displayed.
We found if a space is followed by < , it should be process as html tag. We will fix this issue soon.
But we still hope you can input standard html string value to ignore unknown issues.
Hi,
Hi,
You are welcome.
We will keep looking into your mentioned issue. Once we will have some update/advice for you, we will get back to you asap.
Also, if you face any other issue relating to Aspose.Cells, please let us know, we will be glad to assist you.
Hi,
I have downloaded the version specified for Aspose.cell in the thread. But I am getting Index out of range. Did you guys changed anything in the specified version in thread.. ? As previously I downloaded the dll from this thread it was working fine, and Now I am getting "Index out of Range Error " while setting the value for cell.HtmlString..
Thanks.
Hi,
cell.HtmlString is "<Font Style="FONT-WEIGHT: bold;FONT-FAMILY: Arial;FONT-SIZE: 10pt;COLOR: #000000;">Less Fee Waivers & Net Expenses Footnote</Font> "<div><br></div><div>cell.StringValue :- Less Fee Waivers & Net Expenses Footnote.</div><div><br></div><div> cell.HtmlString = cell.StringValue; this line is throwing the error Index out of range. </div><div><br></div>
This is happening for me whenever there is “&” symbol in the cell.StringValue
Hi,
Sample code:
Workbook workbook = new Workbook();
Worksheet worksheet1 = workbook.Worksheets[0];
Cells cells = worksheet1.Cells;
Aspose.Cells.Cell cell = cells[“A1”];
string val = “Less Fee Waivers & Net Expenses Footnote.”;
cell.HtmlString = val; // error
workbook.Save(“e:\test2\outputcellstring.xlsx”);
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^dfsdf23dfewr¥dfs¥.
Hi,
Hi ,
Hi,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.
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.
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”);