officecli-xlsx
Skill này làm gì
Skill này hướng dẫn agent AI làm việc với tệp bảng tính .xlsx qua công cụ officecli. Skill dành cho người tạo, kiểm tra hoặc cập nhật bảng tính.
Khi nào nên dùng
- ✓Khi bạn muốn tạo một bảng tính, bảng theo dõi hoặc bảng tài chính mới từ dữ liệu của mình.
- ✓Khi bạn cần thêm công thức, biểu đồ hoặc bảng tổng hợp vào tệp Excel.
- ✓Khi bạn muốn nhập một tệp CSV vào một sổ làm việc Excel được định dạng đúng.
Liên kết skill
https://github.com/iOfficeAI/OfficeCLI/blob/main/skills/officecli-xlsx/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể biến CSV chi phí này thành một sổ làm việc Excel có tổng và biểu đồ theo tháng không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent nhập dữ liệu, thêm công thức và định dạng, tạo biểu đồ, rồi kiểm tra sổ làm việc qua officecli.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
OfficeCLI XLSX Skill
Setup
If officecli is missing:
- macOS / Linux:
curl -fsSL https://d.officecli.ai/install.sh | bash - Windows (PowerShell):
irm https://d.officecli.ai/install.ps1 | iex
Verify with officecli --version (open a new terminal if PATH hasn't picked up). If install fails, download a binary from https://github.com/iOfficeAI/OfficeCLI/releases.
⚠️ Help-First Rule
This skill teaches what good xlsx looks like, not every command flag. When a property name, enum value, or alias is uncertain, consult help BEFORE guessing.
officecli help xlsx # List all xlsx elements
officecli help xlsx <element> # Full element schema (e.g. pivottable, chart, cf)
officecli help xlsx <verb> <element> # Verb-scoped (e.g. add chart, set cell)
officecli help xlsx <element> --json # Machine-readable schema
Help reflects the installed CLI version. When this skill and help disagree, help is authoritative.
Shell & Execution Discipline
Shell quoting (zsh / bash). Excel paths contain [], and number formats contain $. Both are shell metacharacters. Rules:
- ALWAYS quote element paths:
"/Sheet1/row[1]", not/Sheet1/row[1]. - Use single quotes for any prop value containing
$:numFmt='$#,##0'. - For formulas with cross-sheet
!references, usebatchwith a<<'EOF'heredoc (see Known Issues). \nand\tin a prop value ARE interpreted by the CLI —\nis a real in-cell line break (pair with--prop wrapText=true),\ta tab — consistent across xlsx / docx / pptx. Double them (\\n) for a literal backslash-n (rarely wanted). ($is the shell layer above — single-quote it.)
Incremental execution. Run commands one at a time and read each exit code. officecli mutates the file on every call; a 50-command script that fails at command 3 will cascade silently. One command → check output → continue.
Requirements for Outputs
Before reaching for a command, know what a good xlsx looks like. These are the deliverable standards every workbook MUST meet.
All Excel files
Zero formula errors. Every delivered workbook MUST have ZERO #REF!, #DIV/0!, #VALUE!, #NAME?, #N/A. No exceptions — guard denominators with IFERROR or IF(x=0,...).
Formulas, not hardcoded values. If a number can be computed from other cells, it is a formula. Hardcoding 5000 where =SUM(B2:B9) belongs breaks the contract that the workbook stays live when inputs change. This is the single most important rule in this skill.
Professional font. Use one consistent, professional font across the workbook (Arial / Calibri / Times New Roman). Don't mix four fonts because one sheet came from CSV.
Explicit widths. There is no auto-fit. Any column the user will read MUST have width set — default 8.43 chars clips everything. Sensible starts: labels 20-25, numbers 12-15, dates 12, short codes 8-10.
Preserve existing templates. When editing a file that already has a look, match it. Existing conventions override these guidelines.
Visual delivery floor (applies to EVERY workbook)
Before you declare done, run officecli view "$FILE" html and Read the returned HTML path to confirm all of these:
- No
###in any cell.###means a column is too narrow for its widest value. Every column the user reads needs an explicitwidth.###in a delivered file is unfinished work, never "a small visual nit". - No truncated titles. Sheet titles, section headers, long labels must fit. Widen the column or apply
wrapText=trueon the cell. - No placeholder tokens rendered as data.
$fy$24,{var},<TODO>,xxxxmust never appear in a cell, chart title, series name, or legend. These are build-time tokens that escaped replacement. - Pie / doughnut slices have distinct fill colors. If the slices render same-colored, switch to
bar/columnor setcolors=...explicitly. - No empty trailing pages / empty chart anchors.
anchor=D2:J18over empty source cells looks like a broken chart.
If any of the above fails, STOP and fix before declaring done.
Print layout. Any sheet the user may print or send as a board pack needs page setup. Default portrait + no fit-to-page splits wide tables and charts mid-way. Pick the fit mode by sheet shape:
# Summary / chart / dashboard sheet (small, ≤ ~40 rows): fit to a single page.
officecli set "$FILE" "/Summary" --prop orientation=landscap
Câu hỏi thường gặp
Tôi có cần cài Excel không?
Không. Skill cho biết officecli hoạt động mà không cần cài bất kỳ bộ Office nào.
Có xử lý được công thức giữa các sheet không?
Có. Skill có hướng dẫn về công thức liên sheet và cách viết chúng an toàn.
Những định dạng nào được hỗ trợ?
Skill bao gồm sổ làm việc .xlsx và nhập dữ liệu CSV hoặc TSV.
Chi tiết
Mô tả gốc của tác giả
Use this skill any time a .xlsx file is involved -- as input, output, or both. This includes: creating spreadsheets, financial models, dashboards, or trackers; reading, parsing, or extracting data from any .xlsx file; editing, modifying, or updating existing workbooks; working with formulas, charts, pivot tables, or templates; importing CSV/TSV data into Excel format. Trigger whenever the user mentions 'spreadsheet', 'workbook', 'Excel', 'financial model', 'tracker', 'dashboard', or references a .xlsx/.csv filename.
repo: iOfficeAI/OfficeCLI
Độ phổ biến
- Sao GitHub
- 33k
- Vị trí xếp hạng
- #9137
- Giấy phép
- Apache-2.0
- Cập nhật
- 30/10/2026
Bình luận
- …
Thêm skill từ kho mã này
officecli
33kCho phép agent của bạn tạo, đọc, kiểm tra và chỉnh sửa tệp Word, Excel và PowerPoint bằng công cụ officecli, không cần cài Office.
morph-ppt-3d
33kGiúp agent của bạn tạo bộ slide PowerPoint có mô hình 3D GLB và chuyển cảnh Morph mượt giữa các slide.
morph-ppt
33kGiúp agent của bạn tạo tệp PowerPoint với chuyển cảnh Morph mượt, nơi các hình có thể di chuyển, phóng to hoặc xoay giữa các slide.
officecli-academic-paper
33kGiúp agent của bạn định dạng bài nghiên cứu, luận văn hoặc bản thảo thành tệp Word, với trích dẫn, công thức và bố cục theo chuẩn tạp chí.
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.