隐藏工作表中零值的显示

Contents
[ ]

要在Microsoft Excel中隐藏工作表中的零值(例如Microsoft Excel 2003):

  1. 工具菜单中选择选项,然后选择视图选项卡。

  2. 取消选中零值选项。

  3. 点击确定

    在Microsoft Excel中隐藏零值

todo:image_alt_text

请参阅以下示例代码,演示如何使用Aspose.Cells隐藏零值。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(HidingDisplayOfZeroValues.class);
// Create a new Workbook object
Workbook workbook = new Workbook(dataDir + "book1.xlsx");
// Get First worksheet of the workbook
Worksheet sheet = workbook.getWorksheets().get(0);
// Hide the zero values in the sheet
sheet.setDisplayZeros(false);
// Save the workbook
workbook.save(dataDir + "output.xls");