We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

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.
Live Chat Icon For mobile
Up arrow icon