Python のグリッド線の表示または非表示

Aspose.Cells - グリッド線を表示または非表示にする方法

グリッド線を非表示にする方法

を使用してワークシートを非表示にするにはAspose.Cells Java (Ruby の場合)、displayhidegridlines を呼び出しますモジュール。

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 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."

グリッド線を表示する方法

グリッド線を表示するには、Worksheet クラスの setGridlinesVisible(true) メソッドを使用します。

Python コード

 # Displaying the gridlines of the worksheet

worksheet.setGridlinesVisible(True)

実行コードをダウンロード

ダウンロード**グリッド線を表示しない (Aspose.Cells)**以下のソーシャル コーディング サイトのいずれかから: