,
如图所示,怎么在导出该excel的 时候 将那些 违禁词 标为 红色字体?
HSSFCell cell6 = row3.createCell(5);
List<GoodsBanDetails> list = goodsBanResultList.get(j).getGoodsBanDetails();
StringBuffer detail = new StringBuffer();
for (GoodsBanDetails goodsBanDetails : list) {
String banPlace = goodsBanDetails.getBanPlace(); // 商品广告
String banContent = goodsBanDetails.getBanContent(); // 情侣兔
// 荣耀note5钢化膜全屏覆盖防爆膜彩膜男女适用于魅蓝note5/M621Q
String banWords = goodsBanDetails.getBanWords(); // [荣耀,华为]
detail.append(banPlace + "【含有" + banWords.split(",").length + "个违禁词】" + banWords + ":" + banContent
+ "\n");
/* HSSFRichTextString hssfRichTextString =new HSSFRichTextString();*/
}
cell6.setCellValue(detail.toString()); // 扫描详情
cell6.setCellStyle(cellStyle);
}
}
1.每个单元格内为商品扫描详情List<GoodsBanDetails>