Process Excel and PDF files - extract data, parse tables, generate reports. Use when working with .xlsx, .xls, .csv, .pdf files, or when the user mentions spreadsheet, PDF extraction, or report generation.
处理 Excel 与 PDF 文件:提取数据、解析表格、生成报告。适用于数据导入导出、报表生成、文档解析等场景。
可执行脚本:scripts/excelextract.py(Excel→CSV)、scripts/pdfextract.py(PDF 文本/表格提取),依赖见 scripts/requirements.txt。
python
import pandas as pd
python
bash
pip install pandas openpyxl # xlsx 需要 openpyxl
python
import pdfplumber
with pdfplumber.open(file.pdf) as pdf:
for page in pdf.pages:
text = page.extract_text()
if text:
print(text)
python
with pdfplumber.open(file.pdf) as pdf:
page = pdf.pages[0]
tables = page.extract_tables()
for table in tables:
# table 为二维列表
for row in table:
print(row)
bash
pip install pdfplumber
若需 OCR(扫描版 PDF):pip install pdf2image pytesseract,并安装 Tesseract。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 gi-excel-pdf-process-1776359297 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 gi-excel-pdf-process-1776359297 技能
skillhub install gi-excel-pdf-process-1776359297
文件大小: 3.89 KB | 发布时间: 2026-4-17 14:55