Aug-30-2018, 12:53 PM
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
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