// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); IRange b2 = worksheet.getRange("B2"); // customize the 'Document' run ITextRun run1 = b2.getRichText().add("Document"); run1.getFont().setName("Agency FB"); run1.getFont().setSize(26); run1.getFont().setThemeColor(ThemeColor.Accent1); run1.getFont().setBold(true); // customize the 'Solutions' run ITextRun run2 = b2.getRichText().add(" Solutions"); run2.getFont().setThemeColor(ThemeColor.Accent2); run2.getFont().setName("Arial Black"); run2.getFont().setSize(20); run2.getFont().setUnderline(UnderlineType.Single); // customize the 'for' run ITextRun run3 = b2.getRichText().add(" for "); run3.getFont().setItalic(true); // customize the 'Excel' run ITextRun run4 = b2.getRichText().add("Excel"); run4.getFont().setColor(Color.GetBlue()); run4.getFont().setBold(true); run4.getFont().setSize(26); run4.getFont().setUnderline(UnderlineType.Double); b2.getEntireRow().setRowHeight(42); // Save to an excel file workbook.save("AddTextRun.xlsx");