|
@@ -2408,8 +2408,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
for (int i = 0; i < xssfRichTextString.numFormattingRuns(); i++) {
|
|
|
XSSFFont runFont = xssfRichTextString.getFontOfFormattingRun(i);
|
|
|
Font font = workbook.createFont();
|
|
|
- if (runFont!=null) {
|
|
|
- font.setColor(runFont.getXSSFColor().getIndexed());
|
|
|
+ if (runFont!=null&&font != null) {
|
|
|
+ if(runFont.getXSSFColor()!=null){
|
|
|
+ font.setColor(runFont.getXSSFColor().getIndexed());
|
|
|
+ }
|
|
|
font.setFontHeightInPoints(runFont.getFontHeightInPoints());
|
|
|
font.setBold(runFont.getBold());
|
|
|
font.setItalic(runFont.getItalic());
|