Free Support Forum -

Set one single word in a cell bold(that cell may contain lots of words)

pls let me know if there is any option to set a word in a sentence bold .that sentence exits one single cell.

This message was posted using Aspose.Live 2 Forum



Yes, you may utilize Cell.Characters() method for your task.

Take a look at the following sample code:

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Cells cells = worksheet.Cells;
cells[0,0].PutValue("This is a test");
cells[0,0].Characters(0,10).Font.IsItalic = true;

//test will be bold in the sentence.
cells[0,0].Characters(10, 4).Font.IsBold = true;

Thank you.