Nascondere la visualizzazione dei valori zero nel foglio di lavoro
Contents
[
Hide
]
A volte, devi nascondere i valori zero in un foglio di calcolo. Potrebbe essere una preferenza personale o uno standard di formattazione.
Per nascondere i valori zero in un foglio di lavoro in Microsoft Excel (ad esempio Microsoft Excel 2003):
- DalUtensili menù, selezionareOpzioni , quindi selezionare ilVisualizzazione scheda.
- Deseleziona ilZero valori opzione.
- ClicOK.
Nascondere i valori zero in Microsoft Excel
Vedere il seguente codice di esempio che illustra come nascondere gli zeri utilizzando Aspose.Cells.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); |