👉 Project Website: https://www.python-office.com/ 👈

👉 Open Source Project Discussion Group 👈

github star gitee star atomgit star

AI Programming AI Discussion Group

Main Content


Python Official released python-office, a library for Python automation: Breaking! Official Released Third-Party Library: python-office, Built for Python Automation
No need to write code yourself, just call the ready-made methods.

Hello everyone, this is CoderWanFeng, focusing on sharing: Python Automation.
This series of tutorials introduces the features of python-office automation, one by one.

1. Feature Introduction

Today we introduce one of the features of this library:

Recognize Invoice and Convert to Excel: Only one line of code to recognize invoice images and save the recognition results as Excel.

2. Usage Instructions

Download poocr

Only one command is needed to automatically download and install poocr

1
pip install poocr

Call the Function

Copy the code below, modify the file location, right-click and select Run

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# pip install poocr
import poocr

poocr.ocr2excel.VatInvoiceOCR2Excel(input_path=r'test_files/30-10-VatInvoiceOCR2Excel/',
output_path=r'test_files/30-10-VatInvoiceOCR2Excel',
output_excel='程序员晚枫的发票.xlsx',
id='AKIDmaBRaWFk4D9sWAd9lEYgdNuDQQbhZDqI',
key='JOGuLacQ1OXTBfv53oMispcCH4e1B8rN')
# Parameter explanation:
# input_path: Input file path, can be a single file or folder
# output_path: Output path for the Excel file, uses default filename and saves in current directory
# output_excel: Name of the output Excel file
# id: OCR engine user ID
# key: OCR engine user secret

3. Submit Requirements

Is it simple to implement complex functions with just 1 line of code? The python-office automation library is still under continuous development.
Everyone is welcome to join the discussion group to share your feature requests~

Also welcome developers with technical skills to enrich this project together:

CoderWanFeng focuses on AI programming training. Beginners can start making AI projects after watching his tutorial 《30 Lectures · AI Programming Training Camp》 collaborated with Turing Community.

🎓 AI 编程实战课程

想系统学习 AI 编程?程序员晚枫的 AI 编程实战课 帮你从零上手!