Skip to content

PowerQueryViewer is a Python tool for extracting Power Query M code from Excel (.xlsx, .xlsm, .xlsb). It decodes content within Formulas/Section1.m by navigating Excel's ZIP and XML, offering a direct way to access Power Query M code without Excel, ideal for data analysts and developers.

License

Notifications You must be signed in to change notification settings

jamesdesantiago/PowerQueryViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

PowerQueryViewer

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.

Features

  • 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.

Getting Started

Prerequisites

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.

Installation

  1. Clone the repository to your local machine: git clone https://github.com/jamesdesantiago/PowerQueryViewer.git

  2. Navigate to the cloned repository directory.

  3. There are no external dependencies required to run the script as it uses standard Python libraries.

Usage

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.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Contact

James De Santiago - [email protected]

Project Link: https://github.com/jamesdesantiago/PowerQueryViewer

About

PowerQueryViewer is a Python tool for extracting Power Query M code from Excel (.xlsx, .xlsm, .xlsb). It decodes content within Formulas/Section1.m by navigating Excel's ZIP and XML, offering a direct way to access Power Query M code without Excel, ideal for data analysts and developers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages