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
  Add NER output to pandas dataframe dg3000 0 118 Apr-22-2024, 08:14 PM
Last Post: dg3000
  Pandas keep existing format of Excel AlphaInc 2 1,082 Jan-11-2024, 03:44 AM
Last Post: plonkarchivist
  HTML Decoder pandas dataframe column mbrown009 3 1,060 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Pandas read csv file in 'date/time' chunks MorganSamage 4 1,717 Feb-13-2023, 11:24 AM
Last Post: MorganSamage
  Use pandas to obtain cartesian product between a dataframe of int and equations? haihal 0 1,130 Jan-06-2023, 10:53 PM
Last Post: haihal
Smile How to further boost the data read write speed using pandas tjk9501 1 1,274 Nov-14-2022, 01:46 PM
Last Post: jefsummers
  Pandas Dataframe Filtering based on rows mvdlm 0 1,449 Apr-02-2022, 06:39 PM
Last Post: mvdlm
  Pandas dataframe: calculate metrics by year mcva 1 2,329 Mar-02-2022, 08:22 AM
Last Post: mcva
  Pandas dataframe comparing anto5 0 1,273 Jan-30-2022, 10:21 AM
Last Post: anto5
  PANDAS: DataFrame | Replace and others questions moduki1 2 1,810 Jan-10-2022, 07:19 PM
Last Post: moduki1

Forum Jump:

User Panel Messages

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