Python Forum
Python read Password protected excel and convert to Pandas DataFrame
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python read Password protected excel and convert to Pandas DataFrame
#1
Hi All,

I am new to Python and now actively learning pandas.

I am trying to read a password protected excel file (prompt for password upon open). Surfing on the net and got below solution using win32com object.

xlApp = win32com.client.Dispatch("Excel.Application")
xlwb = xlApp.Workbooks.Open("c:\\temp\\SomeFile.xlsx", False, True, None, password)

However, I want to convert workbook xlwb into a pandas dataframe for some advance processing. I am struggle to find any efficient ways, except flush it to csv and read it again using pandas read_csv function.

Do you have any good suggestion to this?

Also the win32com solution won't be working in Linux server. Is there any generic/native solution so that Python program can read through a password protected excel in any operating systems?

Thank you very much.

Allen
Reply


Messages In This Thread
Python read Password protected excel and convert to Pandas DataFrame - by FORTITUDE - Aug-30-2018, 12:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [Solved] Formatting cells of a pandas dataframe into an OpenDocument ods spreadsheet Calab 1 959 Mar-01-2025, 04:51 AM
Last Post: Calab
  Find duplicates in a pandas dataframe list column on other rows Calab 2 2,515 Sep-18-2024, 07:38 PM
Last Post: Calab
  Find strings by index from a list of indexes in a different Pandas dataframe column Calab 3 1,801 Aug-26-2024, 04:52 PM
Last Post: Calab
  Add NER output to pandas dataframe dg3000 0 1,257 Apr-22-2024, 08:14 PM
Last Post: dg3000
  Pandas keep existing format of Excel AlphaInc 2 11,723 Jan-11-2024, 03:44 AM
Last Post: plonkarchivist
  HTML Decoder pandas dataframe column mbrown009 3 2,881 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Pandas read csv file in 'date/time' chunks MorganSamage 4 3,198 Feb-13-2023, 11:24 AM
Last Post: MorganSamage
  Use pandas to obtain cartesian product between a dataframe of int and equations? haihal 0 2,118 Jan-06-2023, 10:53 PM
Last Post: haihal
Smile How to further boost the data read write speed using pandas tjk9501 1 2,141 Nov-14-2022, 01:46 PM
Last Post: jefsummers
  Pandas Dataframe Filtering based on rows mvdlm 0 2,162 Apr-02-2022, 06:39 PM
Last Post: mvdlm

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020