How to Unzip and Import an XLSX File in Power BI
Question details
The user needs to extract and load data from a compressed zipped XLSX file directly into Power BI.

- Product
- Power BI
- Device & OS
- not provided
- Scenario
- Attempting to import spreadsheet data into Power BI when the source XLSX file is enclosed within a ZIP archive.
- Observed behavior
- Standard data connectors in Power BI may not automatically extract and read XLSX files from compressed archives, requiring alternative extraction methods.
Ensure you have the latest version of Power BI Desktop installed and that your zipped file is not password-protected, as encrypted archives require additional manual steps to extract.
Extract the Archive Before Loading into Power BI
The most straightforward method is to unzip the file locally or on your server before connecting Power BI to the extracted XLSX file.
By manually unzipping the file first, you bypass the need for complex custom connectors or scripts. This approach is highly recommended for static data or files updated infrequently.
Right-click the ZIP archive on your computer and select 'Extract All' to unpack the enclosed XLSX file into a designated local folder.
Open Power BI Desktop, click on 'Get Data' from the Home ribbon, and select 'Excel workbook' from the dropdown list.
Navigate to the folder where you extracted the XLSX file, select it, and click 'Open' to load your data into the Power Query Editor.

Use an R Script to Unzip and Process Files
If you need an automated solution within Power BI, you can use an R script to extract the ZIP archive dynamically during the data import process.
Seek Specialized Help in the Power BI Community
If your data source or environment is highly customized (such as connecting to SharePoint or a web API), standard extraction workarounds might not function correctly.
Manage Your Extracted XLSX Files Easily with WPS Office
While Power BI handles your data visualization, you often need a reliable spreadsheet tool to inspect, clean, or format your XLSX files before importing them. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office for all your spreadsheet preparation needs.
- 1. Download the software: Visit the official WPS Office website to download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to complete the setup.
- 3. Review your data: Launch WPS Spreadsheet to open your extracted XLSX file, allowing you to format or clean the data prior to your Power BI import.

Frequently Asked Questions
Can Power BI natively unzip files directly from a local folder?
Power BI does not currently feature a native 'unzip' connector for local files. While you can connect to a folder to combine standard files, processing ZIP archives automatically usually requires custom Power Query M code, third-party connectors, or external scripts like Python or R.
Why does my XLSX file show as corrupted after extracting it for Power BI?
This commonly happens if the extraction process was interrupted or if the ZIP tool used does not fully support the archive's specific compression protocol. Try extracting the file again using native Windows Explorer or a standard utility like 7-Zip, then reconnect Power BI to the new file.
Can I use Python instead of R to unzip files in Power BI?
Yes. Similar to the R script method, you can use a Python script via the 'Get Data' menu. By utilizing the built-in zipfile library alongside pandas, you can extract the archive and read the resulting XLSX data directly into a Power BI dataframe.




