Skip to content

A simple Python tool to convert electronic invoice (NFe) XML files into Excel spreadsheets. Parses issuer, recipient, and address information from multiple XMLs and generates a clean .xlsx report.

Notifications You must be signed in to change notification settings

mircothibes/XML-to-Excel-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFe XML → Excel Converter

A simple Python tool to parse Electronic invoices (NF-e) XML files and export key information to Excel (.xlsx).


🖼️ Graphical Interface

Here’s how the GUI looks:

XML to Excel Converter GUI


✨ Features

  • Reads all .xml files in a folder (recursive search)
  • Extracts:
    • Invoice key and @Id
    • Issuer name
    • Recipient name
    • Recipient address (street, number, district, city, state, ZIP, country)
  • Exports results to a clean Excel spreadsheet
  • Command-line interface (CLI) with arguments
  • Safe XML parsing (ignores malformed or non-NFe files)
  • Verbose mode for debugging

📦 Requirements

  • Python 3.9+
  • Libraries:
    • xmltodict
    • pandas
    • openpyxl

🚀 Usage

  1. Prepare the XML files

Place your .xml files inside a folder, e.g. NFs/.

By default:

  • Input folder: ./NFs
  • Output file: ./Invoices.xlsx

📜 License

MIT License – free to use, modify, and distribute.


🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to improve.


👨‍💻 Author

Developed by Marcos Vinicius Thibes Kemer


About

A simple Python tool to convert electronic invoice (NFe) XML files into Excel spreadsheets. Parses issuer, recipient, and address information from multiple XMLs and generates a clean .xlsx report.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published