ブック構造の保護と保護解除
Contents
[
Hide
]
他のユーザーによる隠しワークシートの表示、追加、移動、削除、または非表示、およびワークシートの名前の変更を防ぐために、Excelブックの構造をパスワードで保護できます。
Aspose.Cells for Pythonは、Excelファイルのブック構造の保護と保護解除をサポートしています。
MS Excelでのブック構造の保護と保護解除
- レビュー > ブックの保護 をクリックします。
- パスワードボックス にパスワードを入力します。
- OK を選択し、パスワードを再入力して確認し、その後再度 OK を選択します。
Aspose.Cell for Pythonを使用してブック構造を保護します。
Excelファイルのワークシートの構造を保護するためには、次の簡単なコード行のみが必要です。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a new file. | |
workbook = Workbook() | |
#Protect workbook structure. | |
workbook.protect(ProtectionType.STRUCTURE, "password") | |
#Save Excel file. | |
workbook.save("Book1.xlsx") |
Aspose.Cell for Pythonを使用してブックの構造を保護解除します。
Aspose.Cells APIを使用してワークブック構造を保護解除するのは簡単です。正しいパスワードが必要です。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Open an Excel file which workbook structure is protected. | |
workbook = Workbook("Book1.xlsx") | |
#Unprotect workbook structure. | |
workbook.unprotect("password") | |
#Save Excel file. | |
workbook.save("Book1.xlsx") |
注意:正しいパスワードが必要です。