Hi Jiaguo,
Thanks for your posting and using Aspose.Cells.
It could be because of some bug in Aspose.Cells. We need to investigate this issue. Could you please provide us your complete runnable sample code replicating this issue. We will look into it and log it in our database after running at our end so that it could be fixed.
Hi Jiaguo,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue with the latest version. When we comment these lines, it works fine but when we uncomment these lines, it does not work.
//Setting the font of selected characters to bold
// cell.Characters(6, 7).Font.IsBold = true; //uncommenting this line, it will not work
//Setting the font color of selected characters to blue
// cell.Characters(6, 7).Font.Color = Color.Blue; //uncommenting this line, it will not work
I have attached the output.xls file generated by the following code after commenting these lines and subscript and superscript are working.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-42666.
C#
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the first(default) worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[0];
//Accessing the “A1” cell from the worksheet
Cell cell = worksheet.Cells[“A1”];
//Adding some value to the “A1” cell
cell.PutValue(“Visit Aspose!”);
//Setting the font of selected characters to bold
// cell.Characters(6, 7).Font.IsBold = true; //uncommenting this line, it will not work
//Setting the font color of selected characters to blue
// cell.Characters(6, 7).Font.Color = Color.Blue; //uncommenting this line, it will not work
cell.Characters(8, 1).Font.IsSubscript = true;
cell.Characters(9, 1).Font.IsSuperscript = true;
//Saving the Excel file
workbook.Save(“output.xls”);
Thank you for your observation and prompt help !
Hi,
Thanks for your using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v8.0.2.2 and let us know your feedback.
Now the result is correct. Great work !
Hi,
Thank you very much !
The issues you have found earlier (filed as CELLSNET-42666) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.