The power_query_extractor.py
script is a powerful Python utility designed for data analysts, developers, and anyone involved in data transformation and analysis using Excel's Power Query feature. It automates the extraction and decoding of Power Query M code from Excel files (.xlsx, .xlsm, .xlsb), bypassing the need to manually open and navigate through Excel documents.
- Supports Multiple Excel Formats: Works seamlessly with .xlsx, .xlsm, and .xlsb file formats.
- Efficient Extraction and Decoding: Automatically navigates through Excel's internal ZIP and XML structures to extract and decode Power Query M code, specifically targeting content within
Formulas/Section1.m
. - Command-Line Interface: Designed for ease of use, enabling users to quickly extract Power Query M code through a simple command-line instruction.
Ensure you have Python 3.x installed on your system. If you don't have Python installed, you can download it from the official Python website.
-
Clone the repository to your local machine: git clone https://github.com/jamesdesantiago/PowerQueryViewer.git
-
Navigate to the cloned repository directory.
-
There are no external dependencies required to run the script as it uses standard Python libraries.
Run the script from the command line by navigating to the directory containing power_query_extractor.py
and executing:
Replace excel_path
with the actual path to the Excel file you wish to extract Power Query M code from.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE
for more information.
James De Santiago - [email protected]
Project Link: https://github.com/jamesdesantiago/PowerQueryViewer