AI Agent Hub
Back to skills
Universal CJK-Aware XLSX Handling icon

Universal CJK-Aware XLSX Handling

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md and install @user_c66b8218/xlsx007-skill.

About this skill

Problem It Addresses

When working with Excel files, the practical risk is not just calculation but deliverability: Chinese CSV exports may use GB18030 or GBK, CJK text can render as tofu boxes, and naive openpyxl save cycles can discard VBA macros, pivot tables, charts, and slicers. Formula repairs can also leave stale calcChain.xml behind. This skill treats spreadsheet editing as a verifiable engineering task rather than a blind write-back.

How It Works

It routes work around READ → ACT → VERIFY:
- READ: use xlsx_reader.py to discover sheets, macros, pivots, and other structure, then analyze with pandas without modifying the source.
- CREATE: build new workbooks from a minimal XML template, prefer Excel formulas over hardcoded numbers, then pack with xlsx_pack.py.
- EDIT / FIX: unpack the original XML, modify only the targeted cells, preserve vbaProject.bin, pivotTables/, charts/, and related parts, then repack.
- VALIDATE / REVIEW: run formula_check.py for #REF!, circular references, and similar issues, recalculate with libreoffice_recalc.py, and preview with xlsx_render.py using CJK-capable fonts.

Boundaries and Notes

It fits office scenarios with Chinese headers, full-width punctuation, RMB or Chinese date formats, and wan/yi unit display; financial color rules are optional. For visual design, complex chart reconstruction, or non-Excel data pipelines, additional tooling is needed. When processing existing files, do not assume UTF-8 CSV exports and avoid generic load/save round-trips on workbooks with macros or pivot tables.

Use Cases

  • Turn a GB18030 Chinese CSV into a cleaned .xlsx delivery sheet with live formulas.
  • Add a formula column to an existing macro-enabled workbook while preserving sheets, charts, and pivots.
  • Recalculate, validate, and render a workbook after total-row formulas show stale values or zero.
  • Display revenue in wan or yi units with readable CJK headers and column widths that avoid clipping.

Best For

  • Finance analysts who fill columns in macro-enabled workbooks and need formula validation.
  • Data operations staff who clean Chinese CSV exports into deliverable Excel reports.
  • Backend engineers who add XLSX generation, validation, and rendering to automation pipelines.
  • Office tooling developers debugging GB18030 CSVs and CJK rendering issues.