Skip to main content

🔍 OCR API Reference

This page is currently only available in Chinese. Please switch to 简体中文 for the full content.

🔍 OCR API Reference

Sub-package: poocr | Install: pip install poocr Import: import office or import poocr

VatInvoiceOCR2Excel

office.ocr.VatInvoiceOCR2Excel(
input_path,
output_path='./',
output_excel='VatInvoiceOCR2Excel.xlsx',
img_url=None,
id=None,
key=None,
file_name=False,
trans=False
)

Parameters

ParameterTypeDescription
input_pathstrInvoice image path or folder
output_pathstrOutput directory
output_excelstrOutput Excel name
img_urlstrImage URL
id / keystrBaidu API credentials
file_nameboolUse filename as sheet name
transboolTranslate to English

Examples

import office

office.ocr.VatInvoiceOCR2Excel(
input_path='./invoice.jpg',
output_path='./output/'
)

office.ocr.VatInvoiceOCR2Excel(
input_path='./invoices/',
output_path='./output/',
output_excel='all_invoices_summary.xlsx',
file_name=True
)
AI 办公效率课
35 讲 AI 自动化办公实战课用 Python + AI 处理 Excel、Word、PDF、邮件等办公场景。
去学习