Visa eller dölj rutnät i Python
Contents
[
Hide
]
Aspose.Cells - Hur man visar eller döljer rutnätslinjer
Hur man döljer rutnät
För att dölja kalkylblad medAspose.Cells Java för Ruby, ring displayhidegridlines modul.
Python Kod
workbook = self.Workbook(self.dataDir + "Book1.xls")
# Accessing the first worksheet in the Excel file
worksheets = workbook.getWorksheets()
worksheet = worksheets.get(0)
# Hiding the grid lines of the first worksheet of the Excel file
worksheet.setGridlinesVisible(False)
# Saving the modified Excel file in default (that is Excel 2000) format
workbook.save(self.dataDir + "output.xls")
\# Print message
print "Grid lines are now hidden on sheet 1, please check the output document."
Hur man visar rutnät
För att göra rutnätslinjer synliga, använd arbetsbladsklassens setGridlinesVisible(true) metod.
Python Kod
# Displaying the gridlines of the worksheet
worksheet.setGridlinesVisible(True)
Ladda ner Running Code
Ladda nerDisplayHide Gridlines (Aspose.Cells) från någon av nedan nämnda webbplatser för social kodning: