Ocultar la visualización de valores cero en la hoja de trabajo
Contents
[
Hide
]
A veces, necesita ocultar valores cero en una hoja de cálculo. Puede ser una preferencia personal o un estándar de formato.
Para ocultar valores cero en una hoja de cálculo en Microsoft Excel (por ejemplo, Microsoft Excel 2003):
- Desde elHerramientas menú, seleccioneOpciones y, a continuación, seleccione elVista pestaña.
- Deseleccione elValores cero opción.
- Hacer clicDE ACUERDO.
Ocultar valores cero en Microsoft Excel
Consulte el siguiente código de ejemplo que muestra cómo ocultar ceros con Aspose.Cells.
This file contains hidden or 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"); |