0

i have an encrypted excel file that i need to work with i know how to read data from that using this method

import io
import pandas as pd
import msoffcrypto

password= 'something'

decrypted_file = io.BytesIO()
with open(path_to_excel, "rb") as file:
    excel_file = msoffcrypto.OfficeFile(file)
    excel_file.load_key(password)
    excel_file.decrypt(decrypted_file)
return decrypted_file

how to read data: From password-protected Excel file to pandas DataFrame

now my question is how to write back to such files?

0 Answers0