Formatting style for a cell

Hi all,
Is it possible to make many styles (for example: BOLD_TEXT + ITALIC_TEXT) in the same cell in excel sheet.

1 Reply

CP Chella Pandian B Syncfusion Team November 14, 2006 05:02 PM UTC

Hi Nora

It is possible to make many styles in the same cell. I have created a sample please check it out.

IRange Range = sheet.Range["A1"];
Range.Text = "Bold and Italic";
IRichTextString rtf = Range.RichText;
IFont Font = workbook.CreateFont();
Font.Bold = true;
Font.Italic = true;
rtf.SetFont(0, Range.Text.Length-1,Font);

Sample:
BoldItalic.zip

with regards,
Chella.

Loader.
Up arrow icon