Pythonでワークシートを非表示または表示する
Contents
 [
      
        Hide
      ]
    Aspose.Cells - ワークシートを非表示または表示する
ワークシートを非表示にする
Aspose.Cells Java for Rubyを使用してモジュールhideunhideworksheetを呼び出してワークシートを非表示にします。
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."ワークシートを表示する
開発者は、WorksheetクラスのsetVisible(true)メソッドを設定することで、ワークシートを表示できます。
Pythonコード
 # Displaying the worksheet of the Excel file
worksheet.setVisible(true)ランニングコードのダウンロード
以下のソーシャルコーディングサイトから**Hide or Unhide a Worksheet (Aspose.Cells)**をダウンロードしてください: