I need to be able to formats certain sentences within a cell of data within Cells.NET.
Following code snippet will help you. If there is any issue, please feel free to reach us.
string filename = @"C:\exceltrash\Sample_1.xlsx";
Workbook workbook = new Workbook();
int sheetIndex = workbook.Worksheets.Add();
Worksheet worksheet = workbook.Worksheets[sheetIndex];
int commentIndex = worksheet.Comments.Add("F5");
Comment objcomment = worksheet.Comments[commentIndex];
objcomment.Note = "This is my Comment";
objcomment.Characters(0, 10).Font.IsBold = false;
objcomment.Characters(11, 7).Font.Name = "Tahoma";
objcomment.Characters(11, 7).Font.Size = 15;
objcomment.Characters(11, 7).Font.Color = Color.Red;
objcomment.Characters(11, 7).Font.IsBold = true;
objcomment.Characters(11, 7).Font.IsItalic = true;