$npx -y skills add agentscope-ai/QwenPaw --skill xlsx-enUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); cre
| 1 | > **Important:** All `scripts/` paths are relative to this skill directory. |
| 2 | > Run with: `cd {this_skill_dir} && python scripts/...` |
| 3 | > Or use the `cwd` parameter of `execute_shell_command`. |
| 4 | |
| 5 | # Requirements for Outputs |
| 6 | |
| 7 | ## All Excel files |
| 8 | |
| 9 | ### Professional Font |
| 10 | - Use a consistent, professional font (e.g., Arial, Times New Roman) for all deliverables unless otherwise instructed by the user |
| 11 | |
| 12 | ### Zero Formula Errors |
| 13 | - Every Excel model MUST be delivered with ZERO formula errors (#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?) |
| 14 | |
| 15 | ### Preserve Existing Templates (when updating templates) |
| 16 | - Study and EXACTLY match existing format, style, and conventions when modifying files |
| 17 | - Never impose standardized formatting on files with established patterns |
| 18 | - Existing template conventions ALWAYS override these guidelines |
| 19 | |
| 20 | ## Financial models |
| 21 | |
| 22 | ### Color Coding Standards |
| 23 | Unless otherwise stated by the user or existing template |
| 24 | |
| 25 | #### Industry-Standard Color Conventions |
| 26 | - **Blue text (RGB: 0,0,255)**: Hardcoded inputs, and numbers users will change for scenarios |
| 27 | - **Black text (RGB: 0,0,0)**: ALL formulas and calculations |
| 28 | - **Green text (RGB: 0,128,0)**: Links pulling from other worksheets within same workbook |
| 29 | - **Red text (RGB: 255,0,0)**: External links to other files |
| 30 | - **Yellow background (RGB: 255,255,0)**: Key assumptions needing attention or cells that need to be updated |
| 31 | |
| 32 | ### Number Formatting Standards |
| 33 | |
| 34 | #### Required Format Rules |
| 35 | - **Years**: Format as text strings (e.g., "2024" not "2,024") |
| 36 | - **Currency**: Use $#,##0 format; ALWAYS specify units in headers ("Revenue ($mm)") |
| 37 | - **Zeros**: Use number formatting to make all zeros "-", including percentages (e.g., "$#,##0;($#,##0);-") |
| 38 | - **Percentages**: Default to 0.0% format (one decimal) |
| 39 | - **Multiples**: Format as 0.0x for valuation multiples (EV/EBITDA, P/E) |
| 40 | - **Negative numbers**: Use parentheses (123) not minus -123 |
| 41 | |
| 42 | ### Formula Construction Rules |
| 43 | |
| 44 | #### Assumptions Placement |
| 45 | - Place ALL assumptions (growth rates, margins, multiples, etc.) in separate assumption cells |
| 46 | - Use cell references instead of hardcoded values in formulas |
| 47 | - Example: Use =B5*(1+$B$6) instead of =B5*1.05 |
| 48 | |
| 49 | #### Formula Error Prevention |
| 50 | - Verify all cell references are correct |
| 51 | - Check for off-by-one errors in ranges |
| 52 | - Ensure consistent formulas across all projection periods |
| 53 | - Test with edge cases (zero values, negative numbers) |
| 54 | - Verify no unintended circular references |
| 55 | |
| 56 | #### Documentation Requirements for Hardcodes |
| 57 | - Comment or in cells beside (if end of table). Format: "Source: [System/Document], [Date], [Specific Reference], [URL if applicable]" |
| 58 | - Examples: |
| 59 | - "Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]" |
| 60 | - "Source: Company 10-Q, Q2 2025, Exhibit 99.1, [SEC EDGAR URL]" |
| 61 | - "Source: Bloomberg Terminal, 8/15/2025, AAPL US Equity" |
| 62 | - "Source: FactSet, 8/20/2025, Consensus Estimates Screen" |
| 63 | |
| 64 | # XLSX creation, editing, and analysis |
| 65 | |
| 66 | ## Overview |
| 67 | |
| 68 | A user may ask you to create, edit, or analyze the contents of an .xlsx file. You have different tools and workflows available for different tasks. |
| 69 | |
| 70 | ## Prerequisites |
| 71 | |
| 72 | - **openpyxl**: Excel file creation and editing |
| 73 | - **pandas**: data analysis and bulk operations |
| 74 | - **LibreOffice** (`soffice`): formula recalculation via `scripts/recalc.py` |
| 75 | - `git` is optional but improves redlining diff output in validation workflows. |
| 76 | - On Windows, dependencies must be installed and available in `PATH`; if missing, report the dependency issue and stop (do not keep retrying). |
| 77 | |
| 78 | ## Important Requirements |
| 79 | |
| 80 | **LibreOffice Required for Formula Recalculation**: Use `scripts/recalc.py` to recalculate formula values. The script auto-configures LibreOffice on first run and handles sandboxed environments where Unix sockets are restricted (via `scripts/office/soffice.py`). |
| 81 | |
| 82 | ## Reading and analyzing data |
| 83 | |
| 84 | ### Data analysis with pandas |
| 85 | For data analysis, visualization, and basic operations, use **pandas** which provides powerful |