我從資料框創建了一個 excel 檔案:
#writer = pd.ExcelWriter('test_1.xlsx', engine='xlsxwriter')
#uniq_pros.to_excel(writer, sheet_name='Sheet1')
#writer.save()
如何使它免受編輯此 Excel 檔案的影響?我只想供用戶查看...
uj5u.com熱心網友回復:
您可以使用 XlsxWriter 作業表的
如果需要,您還可以添加密碼。
uj5u.com熱心網友回復:
“單擊主 Excel 功能區上的“審閱”選項卡。單擊“保護表”。輸入您以后想用來解鎖作業表的密碼。重新輸入您設定的密碼以確認您記住它,然后單擊“確定”。(在 Excel 本身中)在 python 中,您可能可以對其進行加密:以下是一些有用的來源:
https://blog.aspose.com/2021/06/01/encrypt-and-decrypt-excel-files-in-python/
使用 Python 密碼保護 Excel 檔案
https://www.easyxls.com/manual/tutorials/python/protect-excel-sheet-cells.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/385043.html
