Forum Discussion
Loading data from password encrypted Excel file
Hello everyone,
I have an Excel file that is password protected and I'd like to extract data from it in PowerQuery.
Is it possible to do it with the Excel Connector ?
From my research it seems to be impossible, but all the answers are really old, so I'm asking again just to be sure.
Also wouldn't it be possible with a bit of Python in PowerBI ?
Hi Devs
You're not missing anything, it's still not possible with the native Excel Connector, there's no way to supply a password.
Python can work as a workaround though: in Power BI Desktop, you can decrypt the file with a library like msoffcrypto-tool, then load it into pandas for Power Query to use. Note it only works in Desktop with Python installed, and won't refresh in the Service unless you're on Premium/Fabric with a Python-enabled gateway.
Is it thoughtful? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡🟩 Let's connect on LinkedIn
🟧 Feel free to join this LinkedIn Group for Data Enthusiasts.
1 Reply
- DataVitalizer
Super User
Hi Devs
You're not missing anything, it's still not possible with the native Excel Connector, there's no way to supply a password.
Python can work as a workaround though: in Power BI Desktop, you can decrypt the file with a library like msoffcrypto-tool, then load it into pandas for Power Query to use. Note it only works in Desktop with Python installed, and won't refresh in the Service unless you're on Premium/Fabric with a Python-enabled gateway.
Is it thoughtful? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡🟩 Let's connect on LinkedIn
🟧 Feel free to join this LinkedIn Group for Data Enthusiasts.