Visa eller dölj rutnät i Python
Contents
[
Hide
]
Aspose.Cells - Hur man visar eller döljer rutnät
Hur man döljer rutnät
För att dölja kalkylblad med Aspose.Cells Java för Ruby, anropa displayhidegridlines modulen.
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ätet synligt, använd klassen Worksheet metod setGridlinesVisible(true).
Python-kod
# Displaying the gridlines of the worksheet
worksheet.setGridlinesVisible(True)Ladda ned körbar kod
Ladda ner DisplayHideGridlines (Aspose.Cells) från någon av de sociala kodningsplatserna nedan: