Ocultar o mostrar una hoja de trabajo en Python

Aspose.Cells - Ocultar o mostrar una hoja de trabajo

Ocultar una hoja de trabajo

Para ocultar la hoja de trabajo usando Aspose.Cells Java para Ruby, llameocultarunhideworksheet módulo.

Código Python

 workbook = self.Workbook(self.dataDir + "Book1.xls")

# Accessing the first worksheet in the Excel file

worksheets = workbook.getWorksheets()

worksheet = worksheets.get(0)

# Hiding the first worksheet of the Excel file

worksheet.setVisible(True)

# Saving the modified Excel file in default (that is Excel 2003) format

workbook.save(self.dataDir + "output.xls")

\# Print message

print "Worksheet 1 is now hidden, please check the output document."

Mostrando una hoja de trabajo

Los desarrolladores pueden hacer que una hoja de trabajo sea visible configurando elestablecerVisible( verdadero *)*metodo de laHoja de cálculoclase.

Código Python

 # Displaying the worksheet of the Excel file

worksheet.setVisible(true)

Descargar código de ejecución

DescargarOcultar o mostrar una hoja de trabajo (Aspose.Cells) de cualquiera de los sitios de codificación social mencionados a continuación: