`

POI自定义column width

    博客分类:
  • POI
POI 
阅读更多

POI设置自定义column width

...
Cell oosCell = orow.createCell(oosCellNum);
Sheet oSheet = outputWb.createSheet("输出结果");
oSheet.setColumnWidth(oosCellNum, 8 * 256);
oosCell.setCellValue(oosPass);
switch (oosPass){
   case XlsxFileUtils.OOS_PASS:
      oosCell.setCellStyle(greenStyle);
      break;

   case XlsxFileUtils.OOS_FAILED:
   case XlsxFileUtils.OOS_ERROR:
      oosCell.setCellStyle(redStyle);
      break;
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics