1金币
最佳答案您好,请参考以下代码:
Workbook workbook = new Workbook();
IWorksheet worksheet = workbook.getActiveSheet();
IFormatCondition condition = (IFormatCondition) worksheet.getRange("A1:A7").getFormatConditions().add(FormatConditionType.CellValue, FormatConditionOperator.Equal, 0, null);
condition.setNumberFormat("-");
workbook.save("test.xlsx");
| |
| |