How to use rich text in a cell?

Jan 16, 2012 at 8:57 AM

In Apache POI we can append XSSFRichTextString to a cell, how can we do this in NPOI

Jan 16, 2012 at 9:54 AM
haughtycool wrote:

In Apache POI we can append XSSFRichTextString to a cell, how can we do this in NPOI

      var font1 = templateWorkbook.CreateFont();
            font1.Boldweight = (short)FontBoldWeight.BOLD;
            font1.Color = (new HSSFColor.BLUE()).GetIndex();
            rt.ApplyFont(0, 10, font1);

            var font2 = templateWorkbook.CreateFont();
            font2.Underline = FontUnderline.DOUBLE.ByteValue;

            font2.Color = (new HSSFColor.RED()).GetIndex();
            rt.ApplyFont(10, 19, font2);