How to open a password protected excel file using python?

后端 未结 3 1979
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 16:58

I looked at the previous threads regarding this topic, but they have not helped solve the problem.

  • how to read password protected excel in python

相关标签:
3条回答
  • 2020-12-01 17:37

    If your file size is small, you can probably save that as ".csv". and then read

    It worked for me :)

    0 讨论(0)
  • 2020-12-01 17:38

    Openpyxl Package works if you are using linux system. You can use secure the file by setting up a password and open the file using the same password.

    For more info: https://www.quora.com/How-do-I-open-read-password-protected-xls-or-xlsx-Excel-file-using-python-in-Linux

    0 讨论(0)
  • 2020-12-01 17:42

    I don't think that named parameters work in this case. So you'd have to do something like:

    xlwb = xlApp.Workbooks.Open(filename, False, True, None, password)
    

    See http://msdn.microsoft.com/en-us/library/office/ff194819.aspx for details on the Workbooks.Open method.

    0 讨论(0)
提交回复
热议问题