[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E6CDSTK04SAW2YBME2EX3T":3,"skill-same:01M7E6CDSTK04SAW2YBME2EX3T":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7E6CDSTK04SAW2YBME2EX3T","Excel",null,"Use this skill when a user requests to create, modify, analyze, visualize, or work with spreadsheet files (`.xlsx`, `.xls`, `.csv`, `.tsv`) with formulas, formatting, charts, tables, and recalculation.","wxdwu\u002Fnew-api","wxdwu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F80968397?v=4","01M7E6AEMB59N90BKXD77EC83D","Xudong Wu","01M7E6AEMY2BXCDVZ9MJJHFQ4C",0,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"Excel\"\ndescription: \"Use this skill when a user requests to create, modify, analyze, visualize, or work with spreadsheet files (`.xlsx`, `.xls`, `.csv`, `.tsv`) with formulas, formatting, charts, tables, and recalculation.\"\n---\n\n# Spreadsheets skill\n\nThis skill includes guidelines for how to produce a correct, polished spreadsheet artifact quickly that completes the user's request. When producing spreadsheets or workbooks, you will be judged on layout, readability, style, adherence to industry norms\u002Fconventions and correctness. Follow the guidelines below for how to use the APIs effectively and how to verify your output before finalizing work for the user.\n\nFor complex, analytical, financial or research involved tasks, you are especially judged on correctness and quality. You need to be professional. For these, always make sure you have a plan for how you're organizing the spreadsheet, and the data or visualizations within each sheet. For business, finance, operations, dashboard, and data-analysis prompts, aim for an output that can compete with a strong analyst-built workbook, not just a functional grid. A good default shape is an executive summary or dashboard first, then source\u002Fassumptions, then model\u002Fdetail sheets. For simpler tasks like a creating template or tracker, or things that do not require research, prioritize doing the spreadsheet build and edits quickly, while ensuring the user's request is fulfilled.\n\nFor additional stylistic best practices, follow: `style_guidelines.md`\n\n# Tools + Contract\n- Use the existing installed `@oai\u002Fartifact-tool` JS package which exists in the default Codex workspace dependencies node_modules for authoring, editing, inspecting, rendering, and exporting spreadsheet `.xlsx` workbooks. Use the bundled workspace Node.js and Python runtimes for local builders and helper scripts.\n- Run builder files from a writable conversation-specific temp or workspace directory, not from the managed dependency directory.\n- For JavaScript builders, do not use `NODE_PATH`; ensure bundled packages resolve through normal Node package lookup from the builder file.\n- If needed, create a local `node_modules` directory link or Windows junction to the bundled `node_modules`; do not copy bundled dependency directories or import internal package files directly.\n- Prefer to use a single executable JavaScript builder (.mjs); patch and rerun the same builder file when iterating. Do not put script bodies in shell heredocs or inline shell script bodies, or keep extra workspace-local builder copies.\n- Final user-facing response: Must include a short summary of the workbook\u002Fsheets\u002Franges created or edited, plus standalone Markdown link(s) only to final `.xlsx` artifact(s), with this link format `[Revenue Model - model.xlsx](\u002Fabsolute\u002Fpath\u002Fto\u002Fmodel.xlsx)`; using a platform-appropriate absolute filesystem path. If there are multiple requested final workbooks, put each final `.xlsx` Markdown link on its own line. Do not wrap final artifact links in backticks or code fences, and do not put them in bullets, headings, or prose sentences.\n- The final response summary must describe only the user-visible result. Do not mention implementation details such as `artifact_tool`, artifact-tool, `@oai\u002Fartifact-tool`, the Node\u002FJS builder, copied builder scripts, package manifests, export workflow, verification workflow, rendered previews, or internal tooling unless explicitly requested.\n- Do not link to or mention rendered previews, copied builder scripts, intermediate JSON\u002FCSV\u002Flog files, scratch files, or other support artifacts unless explicitly requested. Do not delete or suppress support files just to satisfy this response rule.\n- Do not use alternate workbook creation\u002Fediting libraries such as `openpyxl`, `xlsxwriter`, or `pandas.ExcelWriter` unless the user explicitly asks for a non-artifact-tool fallback.\n- For analysis outside workbook authoring, use the simplest reliable installed tool. If analysis cannot be done directly in the JavaScript script or via formulas in the spreadsheet, additional Python libraries such as `pandas`\u002F`numpy` are available in the bundled Python runtime in the default Codex workspace dependencies. Save analysis outputs as JSON\u002FCSV; the JavaScript builder should read those files and create the workbook with `@oai\u002Fartifact-tool`. Keep workbook-derived or user-editable calculations as spreadsheet formulas when auditability or future editing matters.\n- Use the update_plan tool to communicate your approach with the user and ensure you're staying on track to produce the best outcome for the user. Generally, your plan should emphasize speed to a correct first version, followed by incremental improvements and verification. Incrementally rendering your work and assessing overall aesthetics, formatting and correctness along the way is very important (you should rigorously inspect the output and be confident in quality), but do not get stuck in a long render-verify loop. As part of your plan, think about the best practices and conventions to follow for the specific type of spreadsheet you're creating and the best way to structure the workbook for readability and usability.\n\n# General Rules\n- Start meaningful edits quickly; avoid long upfront API exploration.\n- Core APIs are listed in the API reference section below. Use them.\n- If these skill instructions are already loaded in context, do not spend a shell turn re-reading this `SKILL.md` from disk. Move directly to the prompt, attachments, and workbook build.\n- For workbook with multiple tabs\u002Fsheets, create\u002Fpopulate non-formula inputs\u002Ftables and sheets prior to populating cross-sheet formulas.\n\n## Approach for quickly building a new spreadsheet\n1. Setup: import `@oai\u002Fartifact-tool`, create workbook\u002Fsheets for new files.\n2. Build quickly: bulk-write headers\u002Fdata\u002Fformulas; then formatting\u002Fvalidation\u002Fconditional formatting; add charts\u002Ftables only when needed.\n3. Use additional focused calls if helpful for streamed progress.\n4. Near completion: inspect key ranges, scan formula errors, render all the sheets and verify, run a validation pass \n5. Export `.xlsx`\n\n## Making edits on a spreadsheet\nIf a user asks to edit or add to an existing spreadsheet:\n- For visual fix requests, start with the smallest plausible local change rather than applying sheet-wide autofit, wrapping, or restyling.\n- When making edits, ensure existing formulas and patterns are consistent. For example, if asked to add another column or row to a table and there is conditional formatting applied to the whole table, it should extend to the new column or rows as well.\n- If specific cells\u002Frows\u002Fcolumns are specified in prompt, limit edits to those ranges unless a broader change is clearly necessary. The exceptions are when other parts of the spreadsheet depend on them, e.g. if there's a dynamic chart that is based on the range of values in a table and a new row is added, the chart should include that new row. Another example is if conditional formatting was already set for a table from A1:C5, and you add a new column D, the conditional formatting should be updated (or deleted and re-created) to cover A1:D5.\n- For column resizing, avoid autofitting by default: instead, inspect only relevant data range, measure the longest text entry in that range, and set columnWidthPx to an estimated width based on text length (with a reasonable min\u002Fmax cap). Use autofit only when the user explicitly asks for it.\n\n## Handling queries and questions\n- The user may ask questions about the sheet instead of requesting an edit or a change. Simply answer those questions about the spreadsheet based on the context available rather than making an edit the user didn't intend for. You can use inspect to learn more or directly read values\u002Fformulas\u002Ftables etc via accessor methods.\n\n# Error Recovery\nOn first error:\n1. Read error text.\n2. Run one targeted `workbook.help(\"\u003Cexact_api>\")` query only if needed.\n3. Retry with minimal patch (not full rewrite).\n4. Continue from existing workbook state.\n\nDo not loop indefinitely on similar failures.\n\n# Quality Guidelines\n- Keep layout readable and bounded, contents visible:\n  - avoid extreme width\u002Fheight from unconstrained autofit\n  - cap oversized widths\u002Fheights after `autofit` + `wrap_text`\n- Prefer formula-driven logic over manual painted cells when logic is expected.\n- Derived values must be formulas (not hardcoded) and legible.\n- Use absolute\u002Frelative references correctly for fill\u002Fcopy behavior.\n- Do not use magic numbers in formulas; reference cells (e.g. `=H6*(1+$B$3)`).\n- Blank editable templates must look blank\u002Fneutral before user data is entered. Count, ranking, best\u002Fworst, IRR\u002FRATE\u002FXIRR, variance, and status formulas should guard on required input cells and return `\"\"`, `0`, or a clear \"No entries yet\" state as appropriate. Alternatively, prefill with a few rows of example data.\n- Include at least one visual summary for tracker\u002Fplanning requests when appropriate (KPI block, chart, dashboard area).\n- For dashboard, visualization, chart-ready analysis, budget\u002Freporting, trend, schedule\u002Ftimeline, and KPI prompts with plottable data, include at least one native Excel chart unless a verified export failure remains after simplifying the chart. Do not silently replace all charts with styled tables.\n- For presentation-ready analytical workbooks, plain range formatting alone is usually not enough. Prefer real Excel structures where useful: tables, freeze panes, filters, data validation, conditional formats, and at least one chart\u002FKPI\u002Fdashboard visual when the prompt implies summary analysis.\n- In rendered previews of dashboards and summary sheets, check financial values and row labels at normal zoom. Widen columns, adjust row heights, or move chart panels until important numbers and text are not clipped, awkwardly wrapped, or hidden.\n\n# Completion Criteria\nComplete only when:\n- Workbook content is populated and formulas compute.\n- No obvious formula errors in key scanned ranges (no bad refs\u002Foff-by-one\u002Fcircular errors).\n- `.xlsx` saved to `outputs\u002F\u003Cunique_thread_id>\u002F`.\n- Layout is organized, legible, and aligned to request style (or default formatting baseline).\n\n# Verification Rules\nBefore final response, verify values\u002Fformulas and visual quality.\n\n1. Inspect key ranges:\n```js\nconst check = await workbook.inspect({\n  kind: \"table\",\n  range: \"Dashboard!A1:H20\",\n  include: \"values,formulas\",\n  tableMaxRows: 20,\n  tableMaxCols: 12,\n});\nconsole.log(check.ndjson);\n```\n\nInspect targeting:\n- Prefer sheet-qualified ranges (`\"Sheet!A1:H20\"`) or `sheetId`.\n\n2. Scan formula errors:\n```js\nconst errors = await workbook.inspect({\n  kind: \"match\",\n  searchTerm: \"#REF!|#DIV\u002F0!|#VALUE!|#NAME\\\\?|#N\u002FA\",\n  options: { useRegex: true, maxResults: 300 },\n  summary: \"final formula error scan\",\n});\nconsole.log(errors.ndjson);\n```\n\n3. Render sheets\u002Franges to verify visual output (skip if already verified and no style changes):\n```js\nconst blob = await workbook.render({ sheetName: \"Sheet1\", range: \"A1:H20\", scale: 2 });\n```\nMake sure you do at least one visual pass of all the sheets in the workbook before the final export.\n\nVisual requirements:\n- Fix severe defects before finalizing: blank\u002Fbroken charts, clipped key headers or numbers, unreadable colors, obvious formula errors, default blank sheets, or content outside the visible working area.\n- Ensure logical labels or titles appear once, texts are all clearly visible, and merged ranges exist where labels or content intentionally span multiple columns.\n- Do one focused visual repair pass after the initial render. Do not spend additional passes on minor polish once the workbook is correct, legible, and exported; note any minor limitation briefly and finalize.\n\n4. Keep verification compact:\n- Inspect key ranges.\n- Avoid huge NDJSON dumps.\n\n5. Export:\n```js\nawait fs.mkdir(outputDir, { recursive: true });\nconst output = await SpreadsheetFile.exportXlsx(workbook);\nawait output.save(`${outputDir}\u002Foutput.xlsx`);\n```\n\n6. Finalize immediately after successful export + compact verification.\n- Do not export extra `.xlsx` variants unless asked.\n- Do not keep iterating on alternate designs once requirements are met, unless asked.\n\n# Additional Instructions\nRead the following templates instructions ONLY when a request relates to any of the following:\n- Investment banking, company financial models, valuation, multi-statement forecasts, or source-backed financial filing analysis: templates\u002Ffinancial_models.md\n\nDo not load these for other tasks that are unrelated unless the prompt explicitly asks for it.\n\n# Source and PDF Extraction\n- For PDF or 10-K\u002F10-Q style inputs, can read PDF via python library `pypdf`, if available, then use one small structured extraction script to collect all required facts into a dict\u002FJSON object. Avoid many ad hoc `rg`\u002F`sed` passes over the same text.\n- Keep source notes compact: record file name, section\u002Ftable label, and enough context to audit the number. Do not paste large PDF excerpts into the workbook unless requested.\n\n# Using artifact_tool APIs (JavaScript)\n\n## Required Imports + Startup\n\nImport existing workbook only when needed:\n```js\nimport { FileBlob, SpreadsheetFile } from \"@oai\u002Fartifact-tool\";\n\nconst input = await FileBlob.load(\"path\u002Fto\u002Finput.xlsx\");\nconst workbook = await SpreadsheetFile.importXlsx(input);\n```\n\nImport CSV text directly when the source or intermediate data is CSV:\n```js\nimport fs from \"node:fs\u002Fpromises\";\nimport { Workbook } from \"@oai\u002Fartifact-tool\";\n\nconst csvText = await fs.readFile(\"path\u002Fto\u002Finput.csv\", \"utf8\");\nconst workbook = await Workbook.fromCSV(csvText, { sheetName: \"Sheet1\" });\n```\nPrefer `Workbook.fromCSV(...)` over hand-parsing CSV rows; clean or analyze CSV with Python\u002FNode first only when needed.\n\nCreate new workbook:\n```js\nimport fs from \"node:fs\u002Fpromises\";\nimport { SpreadsheetFile, Workbook } from \"@oai\u002Fartifact-tool\";\n\nconst workbook = Workbook.create();\nconst sheet = workbook.worksheets.add(\"Inputs\");\n```\n\nFinal export:\n```js\nawait fs.mkdir(outputDir, { recursive: true });\nconst output = await SpreadsheetFile.exportXlsx(workbook);\nawait output.save(`${outputDir}\u002Foutput.xlsx`);\n```\n\n## Build Rules\n- Prefer block writes (`range.values`, `range.formulas`) over per-cell loops. Matrix shape must match the target range (for example `\"D4:M4\"` should be a 1x10 matrix, row x col).\n- Seed scalar formulas once, then `fillDown()` \u002F `fillRight()`. For dynamic-array formulas (`SEQUENCE`, `UNIQUE`, `FILTER`, `SORT`, `VSTACK`, `HSTACK`), write only the anchor cell and let the result spill after.\n- Use `range.displayFormulas` plus `range.formulaInfos` when you need to understand a spill child or a data-table output cell.\n- You do not need to call recalculate; calculation automatically happens.\n- Date handling:\n  - Prefer real `Date` objects for sortable\u002Fcharted\u002Fformula date columns.\n  - Apply date formats explicitly (for example `yyyy-mm-dd`).\n- Use JSON-serializable values for non-Date cells: `string | number | boolean | null`.\n- If a cell is intended to display literal text that begins with `=`, write it as a value prefixed with a single quote (for example `'=B2*C2`). This includes formula descriptions, validation examples, and labels; do not write these cells through `range.formulas`.\n- Create every worksheet referenced by formulas before writing any cross-sheet formulas.\n- When rebuilding dashboards, delete drawings first with `sheet.deleteAllDrawings()`. `range.clear()` does not remove charts, shapes, or images.\n- Verify with `await workbook.inspect(...)`; use `workbook.help(...)` only when the quick surface below is insufficient.\n\n## Conventions\n- Use camelCase API names and option keys.\n- Cell\u002Frange addressing: A1 notation (`sheet.getRange(\"A1:C10\")`).\n- Drawing anchors (`sheet.charts`, `sheet.shapes`, `sheet.images`): 0-based `{ row, col }`.\n- Drawing offsets\u002Fextents use pixels (`rowOffsetPx`, `colOffsetPx`, `widthPx`, `heightPx`).\n\n## Discovery Policy (Strict)\n- Use this quick API surface first.\n- Use `workbook.help(...)` only when blocked by uncertainty.\n- For help queries, start with exact feature\u002Fpath lookups (`chart`, `worksheet.getRange`, `worksheet.freezePanes`, `range.dataValidation`, `chart.series.add`). If an exact path fails, one broader wildcard search is allowed.\n- Do not repeat semantically similar help queries.\n- If one help query returns 0 matches, reformulate once, then proceed best-effort.\n- `render` can be used to examine an existing workbook visually and for visual verifications.\n\nUseful help calls:\n```js\nconsole.log(workbook.help(\"shape.add\", { include: \"examples,notes\" }).ndjson);\nconsole.log(\n  workbook.help(\"*\", {\n    search: \"fill|borders|autofit\",\n    include: \"index,examples,notes\",\n    maxChars: 6000,\n  }).ndjson,\n);\n```\n\n## Reading existing\u002Fimported workbooks\n- On existing\u002Fimported workbooks, get a compact summary via `inspect` to understand what already exists and where.\n- Prefer `inspect(...)` for workbook understanding and discovery across broad areas.\n- Prefer direct getters like `range.formulas` when you already know the target range and need the exact rectangular formula matrix.\n- If formula locations are unknown, prefer `inspect({ kind: \"formula\", ... })` over reading `range.formulas` across a very large area.\n- Prefer to set `maxChars`, `tableMaxRows`, `tableMaxCols`, and\u002For `maxResults` to prevent large dumps of data.\n\n### Inspect for workbook understanding\n- Compact summary:\n```js\nawait wb.inspect({\n  kind: \"workbook,sheet,table\",\n  maxChars: 6000,\n  tableMaxRows: 6,\n  tableMaxCols: 6,\n  tableMaxCellChars: 80,\n});\n```\n- Quick overview of sheet ids and names: `await wb.inspect({ kind: \"sheet\", include: \"id,name\" })`\n- Formula discovery in a targeted area: `await wb.inspect({ kind: \"formula\", sheetId: firstSheetName, range: \"A1:Z30\", maxChars: 2500, options: {maxResults:50} })`\n- Checking existing styles in a targeted area: `await wb.inspect({ kind: \"computedStyle\", sheetId: firstSheetName, range: \"A1:E10\", maxChars: 2500 })`\n- Common `kind` tokens: `workbook`, `sheet`, `table`, `region`, `match`, `formula`, `thread`, `computedStyle`, `definedName`, `drawing`\n- Inspects can also be used to zoom in on specific areas, especially for target edits:\n```js\nawait wb.inspect({\n  kind: \"region\",\n  sheetId: firstSheetName,\n  range: \"A1:Z30\",\n  maxChars: 2500,\n});\n```\n- Inspect output may include JSON records with `\"id\"` values (for example `\"ws\u002Fr5qsk5\"`), which you can resolve back to workbook objects with `wb.resolve(...)`:\n- `wb.resolve(\"ws\u002F...\")` -> worksheet\n- `wb.resolve(\"th\u002F...\")` -> comment thread\n\n## Additional feature-specific notes\n\n### Merging cells\n- Merging cells is useful for headers, dashboards, visual descriptors, and other multi-cell labels.\n- If you plan to set a range of cells to a single value, consider merging those cells first.\nFor example:\n```js\nconst range = sheet.getRange(\"I23:N24\");\nrange.merge();\nrange.values = [[\"Some long description that should cross multiple cells\"]];\n```\n\n## Known Gotchas (Do Not Repeat)\n- Do not set undocumented attributes on remote objects.\n- `Workbook.create()` starts with no sheets; add one before calling `getActiveWorksheet()`.\n- Use matrix sizes that match target ranges unless you intentionally spill.\n- If a formula appears unsupported, use an alternate equivalent.\n- For cross-sheet formulas in a newly created workbook, create all referenced worksheets first, then write formulas. Avoid writing formulas that reference sheets that have not been added yet.\n- Avoid full-column formula references such as `A:A`, `$A:$A`, or `Sheet!B:B`. Prefer bounded ranges sized to the editable table, e.g. `$A$6:$A$205`, especially inside `COUNTIFS`, `SUMIFS`, `INDEX`, and lookup formulas.\n- If export fails, isolate the cause by checkpoint-exporting after each major feature block: base sheets, values\u002Fformulas, formatting, conditional formatting, tables, charts\u002Frendering. Do this before rewriting the workbook.\n- If export fails with `invalid int32: NaN` or another serialization error after formatting or charts, do not rerun the same script unchanged. First remove or simplify optional drawing\u002Fchart\u002Fstyle details in this order: nested\u002Fcustom border configs, custom chart axis\u002Fstyle mutations, broad row\u002Fcolumn formatting\u002Fautofit calls, then nonessential drawings. Preserve values\u002Fformulas and keep or retry a minimal helper-range chart when the prompt needs charts; only drop all charts\u002Fdrawings if the simplified chart still prevents export.\n- Prefer fills, font hierarchy, spacing, and section bands over complex nested border objects. If you use borders, start with a minimal preset or a very simple thin\u002Flight border on a bounded range and checkpoint export before applying borders widely. Avoid nested `inside`\u002F`around`\u002F`outline` border configs and border `weight` settings unless you have already checkpoint-exported that exact pattern successfully.\n- For chart-heavy dashboards, checkpoint export after the first basic helper-range chart before adding multiple charts or optional axis\u002Fformatting mutations. If a chart export failure happens twice, keep the cleanest minimal chart that exports or replace the failing chart with a clearly labeled helper table\u002FKPI block rather than spending the task on repeated chart debugging.\n- Keep formatting and formulas on bounded ranges. Avoid whole-row or whole-column formatting\u002Fautofit for generated workbooks unless you have verified the export immediately afterward.\n\n## Quick API Surface (High-Value + Common)\n\n### Core workbook\u002Ffile APIs\n- `import { FileBlob, SpreadsheetFile, Workbook } from \"@oai\u002Fartifact-tool\"`\n- `const workbook = Workbook.create(); const sheet = workbook.worksheets.add(\"Sheet1\")`\n- `const workbook = await SpreadsheetFile.importXlsx(arrayBufferOrFileBlob)`\n- `const xlsx = await SpreadsheetFile.exportXlsx(workbook); await xlsx.save(\"output.xlsx\")`\n- `const inspect = await workbook.inspect({ kind: \"sheet\", include: \"id,name\", sheetId, range: \"A1:C10\" })`\n- `const help = workbook.help(\"worksheet.getRange\", { include: \"index,examples\" })`\n- Preferred: `const blob = await workbook.render({ sheetName: \"Sheet1\", autoCrop: \"all\", scale: 1, format: \"png\" })`\n- To get the bytes and\u002For save the blob to file: \n```js\nconst previewBytes = new Uint8Array(await preview.arrayBuffer()); \nawait fs.writeFile(`${outputDir}\u002Fpreview.png`, previewBytes);\n```\n- `const workbook = await Workbook.fromCSV(csvText, { sheetName: \"Sheet1\" })`\n- `await workbook.fromCSV(csvText, { sheetName: \"ImportedData\" })`\n\n### Worksheet selection\u002Fcreation\n- `workbook.worksheets.add(name)`\n- `workbook.worksheets.getItem(name)`\n- `workbook.worksheets.getOrAdd(name, { renameFirstIfOnlyNewSpreadsheet: true })`\n- `workbook.worksheets.getItemAt(index)`\n- `workbook.worksheets.getActiveWorksheet()` (only after at least one sheet exists)\n\n### Worksheet operations\n- `sheet.getRange(\"A1:C10\")`, `sheet.getRangeByIndexes(startRow, startCol, rowCount, colCount)`, `sheet.getCell(row, col)`\n- `sheet.getUsedRange(valuesOnly?)`\n- `sheet.mergeCells(\"A1:C1\")`, `sheet.unmergeCells(\"A1:C1\")`\n- `sheet.freezePanes.freezeRows(1)`, `sheet.freezePanes.freezeColumns(2)`, `sheet.freezePanes.unfreeze()`\n- `sheet.tables`, `sheet.charts`, `sheet.sparklineGroups` (`sheet.sparklines` alias), `sheet.shapes`, `sheet.images`\n- `sheet.showGridLines = false`\n- `sheet.dataTables`, `sheet.conditionalFormattings`, `sheet.dataValidations`\n- `sheet.deleteAllDrawings()` removes charts, shapes, and images before a dashboard rebuild.\n\n### Range values\u002Fformulas\n- `const range = sheet.getRange(\"A1:C10\")`\n- `range.values = [[...], ...]` (2D matrix of values)\n- `range.formulas = [[\"=...\"], ...]`\n- `range.formulasR1C1 = [[\"=RC[-1]*2\"]]`\n- To read: `range.values` \u002F `range.formulas` \u002F `range.displayFormulas` \u002F `range.formulaInfos` (for spill\u002Farray formulas)\n- `range.write(matrixOrPayload)` (auto-sizes\u002Fspills from anchor as needed)\n- `range.writeValues(matrixOrRows)`\n- `range.fillDown()`, `range.fillRight()`\n  - `sheet.getRange(\"D2\").formulas = [[\"=...\"]]`\n  - `sheet.getRange(\"D2:D200\").fillDown()`\n- `range.clear({ applyTo: \"contents\" | \"formats\" | \"all\" })`\n- `range.copyFrom(sourceRange, \"values\" | \"formulas\" | \"all\")` source and destination must have the same shape\n- `range.copyTo(destRange, \"values\" | \"formulas\" | \"all\")`\n- `range.offset(...)`, `range.resize(...)`, `range.getCurrentRegion()`, `range.getRow(i)`, `range.getColumn(j)`\n- `range.getRangeByIndexes(...)`, `range.getCell(...)`\n- `range.merge()`, `range.merge(true)` to merge across, `range.unmerge()`\n\n### Formatting\n- `range.format` supports `fill`, `font`, `numberFormat`, `borders`, alignments, `wrapText`\n- `range.format.autofitColumns()`, `range.format.autofitRows()`\n- `range.format.columnWidth = 18`, `range.format.rowHeight = 24`\n- `range.format.columnWidthPx = 120`, `range.format.rowHeightPx = 24`\n- `range.setNumberFormat(\"yyyy-mm-dd\")`\n- `range.format.numberFormat = [[\"0\"], [\"0.00\"], [\"@\"]]`\n\n### Validation + conditional formatting\n- `range.dataValidation = { rule: { type: \"list\", formula1: \"Categories!$A$2:$A$4\" } }`\n- `range.dataValidation = { rule: { type: \"list\", values: [\"Not Started\", \"In Progress\"] } }`\n- `sheet.dataValidations.add({ range: \"B2:B100\", rule: { type: \"whole\", operator: \"between\", formula1: 1, formula2: 10 } })`\n- `range.conditionalFormats.add(type, config)`\n- `range.conditionalFormats.addCustom(formula, format)`\n- `range.conditionalFormats.addCellIs({...})`\n- `range.conditionalFormats.addDataBar({...})`\n- `range.conditionalFormats.addColorScale({...})`\n- `range.conditionalFormats.deleteAll()` \u002F `range.conditionalFormats.clear()`\n- `sheet.conditionalFormattings.add({ range, rule })`\n\n```js\nconst r = sheet.getRange(\"B2:B20\");\nr.conditionalFormats.addCellIs({\n  operator: \"lessThan\",\n  formula: 0,\n  format: { font: { color: \"#DC2626\" } },\n});\nr.conditionalFormats.addCustom(\"=B2\u003C0\", { fill: \"#FECACA\" });\nr.conditionalFormats.addColorScale({\n  minColor: \"#FEE2E2\",\n  midColor: \"#FEF3C7\",\n  maxColor: \"#DCFCE7\",\n});\nr.conditionalFormats.addDataBar({ color: \"accent5\", gradient: true });\n```\n\n### Tables\n- Rules: When adding new tables, set explicit unique names (`TasksTable`, `SummaryTable`).\n- You cannot have multiple tables over the same range. Before adding a table on an existing\u002Fimported workbook, confirm the target range does not already overlap an existing table. Prefer the initial compact `inspect` summary over a separate tables-only scan when available.\n- `const table = sheet.tables.add(\"A1:H200\", true, \"TasksTable\")`\n- `table.rows.add(null, [[...], ...])`, `table.getDataRows()`, `table.getHeaderRowRange()`\n- Read tables: `sheet.tables.items` -> `Table[]`\n- Set + Getters: `table.name`, `table.style`, `table.style`, `table.showHeaders`\n- Toggles for table utilities (set\u002Fget): `table.showTotals`, `table.showBandedColumns = true`, `table.showFilterButton`\n- `table.delete()`\n\n### Charts\n- Rules: When adding or moving charts, do not cover existing data. Put charts in a reserved rectangle with blank gutter columns\u002Frows around the chart area.\n- Fast chart path, no help lookup needed for common line\u002Fbar\u002Fscatter charts: write a compact helper range with text categories and one column per series, then chart that range.\n```js\nsheet.getRange(\"F4:H7\").values = [\n  [\"Month\", \"Revenue\", \"EBITDA\"],\n  [\"Jan\", 100, 10],\n  [\"Feb\", 120, 18],\n  [\"Mar\", 130, 22],\n];\nconst chart = sheet.charts.add(\"line\", sheet.getRange(\"F4:H7\"));\nchart.setPosition(\"J4\", \"Q20\");\nchart.title = \"Revenue and EBITDA Trend\";\nchart.hasLegend = true;\nchart.xAxis = { axisType: \"textAxis\" };\nchart.yAxis = { numberFormatCode: \"$#,##0\" };\n```\n- Fast chart path from range: `const chart = sheet.charts.add(\"line\", sourceRange)` when the source range already has headers and text x-axis labels.\n- Avoid manual `chart.series.add(...)` and `chart.legend = {...}` on the first pass, unless source-range based chart creation does not work (for example, non-continuous data). Use a helper range chart first, then add optional chart styling only if the basic chart renders and exports cleanly.\n- If you want to set specific chart props after the helper-range path is not enough: `const chart = sheet.charts.add(\"bar\", chartProps)`, then checkpoint export before adding optional styling.\n- If using compat positioning, always set position: `chart.setPosition(\"F2\", \"M20\")`.\n- `sheet.charts.getItemOrNullObject(\"Chart 1\")`, `sheet.charts.deleteAll()`\n- To update x\u002Fy-axis, prefer compact config assignments such as `chart.xAxis = { axisType: \"textAxis\", tickLabelInterval: 2 }` and `chart.yAxis = { numberFormatCode: \"$#,##0\" }`. These help legibility and visibility.\n- For month\u002Fdate x-axes, prefer a chart helper range with text labels such as `Jan 2025` or `2025-01`. Do not rely on date axis number formats alone; rendered previews can show Excel serial numbers.\n- Chart types: `\"bar\" | \"line\" | \"area\" | \"pie\" | \"doughnut\" | \"scatter\" | \"bubble\" | \"radar\" | \"stock\" | \"treemap\" | \"sunburst\" | \"histogram\" | \"boxWhisker\" | \"waterfall\" | \"funnel\" | \"map\"`.\n\n### Sparklines\n- `sheet.sparklines.add({...})`, `sheet.sparklines.clear()`, `sheet.sparklines.deleteAll()` (`sheet.sparklineGroups` is the worksheet-scoped alias)\n\n### Help \u002F Grep\nUse `workbook.help(...)` primarily for obscure\u002Fadvanced surfaces (for example deep chart axis settings, unusual drawing configs, pivot APIs, or uncommon option schemas).\n- `workbook.help(\"enum.ShapeGeometry\", { include: \"index,notes\" }).ndjson`\n- `workbook.help(\"enum.*\", { search: \"ShapeGeometry|LineStyle\", include: \"index\" }).ndjson`\n- `workbook.help(\"shape.add\", { include: \"examples,notes\" }).ndjson`\n- `workbook.help(\"*\", { search: \"fill|borders|autofit\", include: \"index,examples,notes\", maxChars: 6000 }).ndjson`\n\n\n### JavaScript example snippet (runnable)\n\n```js\nimport fs from \"node:fs\u002Fpromises\";\nimport { SpreadsheetFile, Workbook } from \"@oai\u002Fartifact-tool\";\n\nasync function quickApiExample() {\n  const workbook = Workbook.create();\n  var sheet = workbook.worksheets.add(\"ExampleSheet\");\n\n  sheet = workbook.worksheets.getItem(\"ExampleSheet\");\n  sheet.getRange(\"A1:D4\").values = [\n    [\"Name\", \"Personality Type\", \"Age\", \"Birthday\"],\n    [\"John Doe\", \"Introvert\", 30, new Date(\"1990-01-01T00:00:00Z\")],\n    [\"Jane Smith\", \"Extrovert\", 25, new Date(\"1995-02-15T00:00:00Z\")],\n    [\"Jim Very Long Name\", \"Ambivert\", 40, new Date(\"1980-03-20T00:00:00Z\")],\n  ];\n  sheet.getRange(\"E1\").values = [[\"Score\"]];\n  sheet.getRange(\"E2\").formulas = [[\"=C2*10\"]]; \u002F\u002F score is 10 * age\n  sheet.getRange(\"E2:E10\").fillDown();\n  const headerRange = sheet.getRange(\"A1:E1\");\n\n  \u002F\u002F Styling\n  const headerFormats = {\n    fill: \"#0F766E\",\n    font: { bold: true, color: \"#FFFFFF\" },\n    horizontalAlignment: \"center\",\n    verticalAlignment: \"center\",\n    rowHeight: 16,\n  };\n  headerRange.format = headerFormats;\n  headerRange.format.autofitColumns();\n\n  const dataRange = sheet.getRange(\"A2:D10\");\n  dataRange.format.wrapText = true;\n  sheet.showGridLines = false;\n\n  \u002F\u002F Format dates properly.\n  sheet.getRange(\"D2:D10\").format.numberFormat = \"MM\u002FDD\u002FYYYY\";\n\n  \u002F\u002F Conditional formatting\n  sheet.getRange(\"C2:C10\").conditionalFormats.addDataBar({\n    color: \"#704023\",\n    gradient: true,\n  });\n  sheet.getRange(\"E2:E10\").conditionalFormats.add(\"cellIs\", {\n    operator: \"greaterThan\",\n    formula: 300,\n    format: { font: { color: \"#B91C1C\" } },\n  });\n  sheet.conditionalFormattings.add({\n    range: \"B2:B10\",\n    rule: {\n      type: \"expression\",\n      formula: '=B2=\"Introvert\"',\n      format: { fill: \"#FCA5A5\" },\n    },\n  });\n\n  \u002F\u002F Data validation: Since Personality Type is a dropdown category, add data validation.\n  sheet.getRange(\"B2:B10\").dataValidation = {\n    rule: {\n      type: \"list\",\n      values: [\"Introvert\", \"Extrovert\", \"Ambivert\"],\n      \u002F\u002F formula1: \"CategoriesSheet!$A$2:$A$4\", \u002F\u002F Alternative: reference a tunable list\n    },\n  };\n\n  \u002F\u002F Tables: Turn it into a table (for example purposes! Make sure table names are unique)\n  \u002F\u002F NOTE: If hasHeaders=true, the range must include the header row.\n  const table = sheet.tables.add(\"A1:E10\", true, \"PeopleTable\");\n  table.getHeaderRowRange();\n\n  \u002F\u002F First column is still wide since we only auto-fit the first row. Expand it manually.\n  sheet.getRange(\"A1:A10\").format.columnWidth = 20;\n\n  \u002F\u002F Create charts to the right of the table\n  sheet.getRange(\"H1:O1\").merge();\n  sheet.getRange(\"H1\").values = [[\"Charts\"]];\n  sheet.getRange(\"H1\").format = headerFormats;\n\n  \u002F\u002F Adding charts\n  const chart = sheet.charts.add(\"bar\", {\n    from: { row: 1, col: 7 },\n    extent: { widthPx: 620, heightPx: 320 },\n  });\n  chart.title = \"Person by Scores\";\n  chart.hasLegend = true;\n  chart.displayBlanksAs = \"zero\";\n  chart.legend.position = \"right\";\n  chart.barOptions.direction = \"column\";\n  chart.barOptions.grouping = \"clustered\";\n  const sheetRef = sheet.name.replaceAll(\"'\", \"''\");\n  const dataEndRow = 4; \u002F\u002F Keep chart refs to rows with data only.\n\n  const scoreSeries = chart.series.add(\"Scores by Person\");\n  scoreSeries.categoryFormula = `'${sheetRef}'!$A$2:$A$${dataEndRow}`;\n  scoreSeries.formula = `'${sheetRef}'!$E$2:$E$${dataEndRow}`;\n  scoreSeries.valuesFormatCode = \"0\";\n  chart.setPosition(\"H2\", \"O16\");\n\n  \u002F\u002F Granular control over chart axes\n  chart.xAxis = {\n    axisType: \"textAxis\",\n    title: { text: \"Person\", textStyle: { fontSize: 13, bold: true } },\n    position: \"bottom\",\n    orientation: \"minMax\",\n    textStyle: { fontSize: 10 },\n  };\n  chart.yAxis = {\n    axisType: \"textAxis\",\n    title: { text: \"Scores\", textStyle: { fontSize: 13, bold: true } },\n    numberFormatCode: \"0,000\",\n    numberFormatSourceLinked: false,\n  };\n\n  \u002F\u002F Chart 2 - Fastest path with defaults\n  const chart2 = sheet.charts.add(\"line\", sheet.getRange(\"B2:C4\"));\n  chart2.title = \"Scores by Personality\";\n  chart2.setPosition(\"H20\", \"O35\");\n\n  \u002F\u002F Sparklines: add to the right of table\n  const sparklinesHeader = sheet.getRange(\"F1\");\n  sparklinesHeader.values = [[\"Sparklines\"]];\n  sparklinesHeader.format = headerFormats;\n  sparklinesHeader.format.autofitColumns();\n\n  sheet.sparklines.add({\n    type: \"column\", \u002F\u002F \"line\" | \"column\" | \"stacked\"\n    sourceData: sheet.getRange(\"E2:E10\"),\n    targetRange: sheet.getRange(\"F2:F10\"),\n    seriesColor: \"#AAAAAA\",\n  });\n\n  \u002F\u002F Render\n  await fs.mkdir(\"output\", { recursive: true });\n  const pngBlob = await workbook.render({\n    sheetName: \"ExampleSheet\",\n    autoCrop: \"all\",\n    scale: 1,\n    format: \"png\",\n  });\n  const pngBytes = new Uint8Array(await pngBlob.arrayBuffer());\n  await fs.writeFile(\"output\u002Fexample_sheet.png\", pngBytes);\n  console.log(\"Rendered first sheet to 'output\u002Fexample_sheet.png'\");\n\n  \u002F\u002F Export\n  const out = \"output\u002Fexample_sheet.xlsx\";\n  const xlsx = await SpreadsheetFile.exportXlsx(workbook);\n  await xlsx.save(out);\n}\n\nawait quickApiExample();\n```\n\nRender:\n```js\nconst imageBlob = await workbook.render({\n  sheetName: \"ExampleSheet\",\n  autoCrop: \"all\",\n  scale: 1,\n  format: \"png\",\n});\n```\n\nExport:\n```js\nconst xlsx = await SpreadsheetFile.exportXlsx(workbook);\nawait xlsx.save(\"output\u002Fspreadsheet.xlsx\");\n```\n","# Spreadsheets skill\n\nThis skill includes guidelines for how to produce a correct, polished spreadsheet artifact quickly that completes the user's request. When producing spreadsheets or workbooks, you will be judged on layout, readability, style, adherence to industry norms\u002Fconventions and correctness. Follow the guidelines below for how to use the APIs effectively and how to verify your output before finalizing work for the user.\n\nFor complex, analytical, financial or research involved tasks, you are especially judged on correctness and quality. You need to be professional. For these, always make sure you have a plan for how you're organizing the spreadsheet, and the data or visualizations within each sheet. For business, finance, operations, dashboard, and data-analysis prompts, aim for an output that can compete with a strong analyst-built workbook, not just a functional grid. A good default shape is an executive summary or dashboard first, then source\u002Fassumptions, then model\u002Fdetail sheets. For simpler tasks like a creating template or tracker, or things that do not require research, prioritize doing the spreadsheet build and edits quickly, while ensuring the user's request is fulfilled.\n\nFor additional stylistic best practices, follow: `style_guidelines.md`\n\n# Tools + Contract\n- Use the existing installed `@oai\u002Fartifact-tool` JS package which exists in the default Codex workspace dependencies node_modules for authoring, editing, inspecting, rendering, and exporting spreadsheet `.xlsx` workbooks. Use the bundled workspace Node.js and Python runtimes for local builders and helper scripts.\n- Run builder files from a writable conversation-specific temp or workspace directory, not from the managed dependency directory.\n- For JavaScript builders, do not use `NODE_PATH`; ensure bundled packages resolve through normal Node package lookup from the builder file.\n- If needed, create a local `node_modules` directory link or Windows junction to the bundled `node_modules`; do not copy bundled dependency directories or import internal package files directly.\n- Prefer to use a single executable JavaScript builder (.mjs); patch and rerun the same builder file when iterating. Do not put script bodies in shell heredocs or inline shell script bodies, or keep extra workspace-local builder copies.\n- Final user-facing response: Must include a short summary of the workbook\u002Fsheets\u002Franges created or edited, plus standalone Markdown link(s) only to final `.xlsx` artifact(s), with this link format `[Revenue Model - model.xlsx](\u002Fabsolute\u002Fpath\u002Fto\u002Fmodel.xlsx)`; using a platform-appropriate absolute filesystem path. If there are multiple requested final workbooks, put each final `.xlsx` Markdown link on its own line. Do not wrap final artifact links in backticks or code fences, and do not put them in bullets, headings, or prose sentences.\n- The final response summary must describe only the user-visible result. Do not mention implementation details such as `artifact_tool`, artifact-tool, `@oai\u002Fartifact-tool`, the Node\u002FJS builder, copied builder scripts, package manifests, export workflow, verification workflow, rendered previews, or internal tooling unless explicitly requested.\n- Do not link to or mention rendered previews, copied builder scripts, intermediate JSON\u002FCSV\u002Flog files, scratch files, or other support artifacts unless explicitly requested. Do not delete or suppress support files just to satisfy this response rule.\n- Do not use alternate workbook creation\u002Fediting libraries such as `openpyxl`, `xlsxwriter`, or `pandas.ExcelWriter` unless the user explicitly asks for a non-artifact-tool fallback.\n- For analysis outside workbook authoring, use the simplest reliable installed tool. If analysis cannot be done directly in the JavaScript script or via formulas in the spreadsheet, additional Python libraries such as `pandas`\u002F`numpy` are available in the bundled Python runtime in the default Codex workspace dependencies. Save analysis outputs as JSON\u002FCSV; the JavaScript builder should read those files and create the workbook with `@oai\u002Fartifact-tool`. Keep workbook-derived or user-editable calculations as spreadsheet formulas when auditability or future editing matters.\n- Use the update_plan tool to communicate your approach with the user and ensure you're staying on track to produce the best outcome for the user. Generally, your plan should emphasize speed to a correct first version, followed by incremental improvements and verification. Incrementally rendering your work and assessing overall aesthetics, formatting and correctness along the way is very important (you should rigorously inspect the output and be confident in quality), but do not get stuck in a long render-verify loop. As part of your plan, think about the best practices and conventions to follow for the specific type of spreadsheet you're creating and the best way to structure the workbook for readability and usability.\n\n# General Rules\n- Start meaningful edits quickly; avoid long upfront API exploration.\n- Core APIs are listed in the API reference section below. Use them.\n- If these skill instructions are already loaded in context, do not spend a shell turn re-reading this `SKILL.md` from disk. Move directly to the prompt, attachments, and workbook build.\n- For workbook with multiple tabs\u002Fsheets, create\u002Fpopulate non-formula inputs\u002Ftables and sheets prior to populating cross-sheet formulas.\n\n## Approach for quickly building a new spreadsheet\n1. Setup: import `@oai\u002Fartifact-tool`, create workbook\u002Fsheets for new files.\n2. Build quickly: bulk-write headers\u002Fdata\u002Fformulas; then formatting\u002Fvalidation\u002Fconditional formatting; add charts\u002Ftables only when needed.\n3. Use additional focused calls if helpful for streamed progress.\n4. Near completion: inspect key ranges, scan formula errors, render all the sheets and verify, run a validation pass \n5. Export `.xlsx`\n\n## Making edits on a spreadsheet\nIf a user asks to edit or add to an existing spreadsheet:\n- For visual fix requests, start with the smallest plausible local change rather than applying sheet-wide autofit, wrapping, or restyling.\n- When making edits, ensure existing formulas and patterns are consistent. For example, if asked to add another column or row to a table and there is conditional formatting applied to the whole table, it should extend to the new column or rows as well.\n- If specific cells\u002Frows\u002Fcolumns are specified in prompt, limit edits to those ranges unless a broader change is clearly necessary. The exceptions are when other parts of the spreadsheet depend on them, e.g. if there's a dynamic chart that is based on the range of values in a table and a new row is added, the chart should include that new row. Another example is if conditional formatting was already set for a table from A1:C5, and you add a new column D, the conditional formatting should be updated (or deleted and re-created) to cover A1:D5.\n- For column resizing, avoid autofitting by default: instead, inspect only relevant data range, measure the longest text entry in that range, and set columnWidthPx to an estimated width based on text length (with a reasonable min\u002Fmax cap). Use autofit only when the user explicitly asks for it.\n\n## Handling queries and questions\n- The user may ask questions about the sheet instead of requesting an edit or a change. Simply answer those questions about the spreadsheet based on the context available rather than making an edit the user didn't intend for. You can use inspect to learn more or directly read values\u002Fformulas\u002Ftables etc via accessor methods.\n\n# Error Recovery\nOn first error:\n1. Read error text.\n2. Run one targeted `workbook.help(\"\u003Cexact_api>\")` query only if needed.\n3. Retry with minimal patch (not full rewrite).\n4. Continue from existing workbook state.\n\nDo not loop indefinitely on similar failures.\n\n# Quality Guidelines\n- Keep layout readable and bounded, contents visible:\n  - avoid extreme width\u002Fheight from unconstrained autofit\n  - cap oversized widths\u002Fheights after `autofit` + `wrap_text`\n- Prefer formula-driven logic over manual painted cells when logic is expected.\n- Derived values must be formulas (not hardcoded) and legible.\n- Use absolute\u002Frelative references correctly for fill\u002Fcopy behavior.\n- Do not use magic numbers in formulas; reference cells (e.g. `=H6*(1+$B$3)`).\n- Blank editable templates must look blank\u002Fneutral before user data is entered. Count, ranking, best\u002Fworst, IRR\u002FRATE\u002FXIRR, variance, and status formulas should guard on required input cells and return `\"\"`, `0`, or a clear \"No entries yet\" state as appropriate. Alternatively, prefill with a few rows of example data.\n- Include at least one visual summary for tracker\u002Fplanning requests when appropriate (KPI block, chart, dashboard area).\n- For dashboard, visualization, chart-ready analysis, budget\u002Freporting, trend, schedule\u002Ftimeline, and KPI prompts with plottable data, include at least one native Excel chart unless a verified export failure remains after simplifying the chart. Do not silently replace all charts with styled tables.\n- For presentation-ready analytical workbooks, plain range formatting alone is usually not enough. Prefer real Excel structures where useful: tables, freeze panes, filters, data validation, conditional formats, and at least one chart\u002FKPI\u002Fdashboard visual when the prompt implies summary analysis.\n- In rendered previews of dashboards and summary sheets, check financial values and row labels at normal zoom. Widen columns, adjust row heights, or move chart panels until important numbers and text are not clipped, awkwardly wrapped, or hidden.\n\n# Completion Criteria\nComplete only when:\n- Workbook content is populated and formulas compute.\n- No obvious formula errors in key scanned ranges (no bad refs\u002Foff-by-one\u002Fcircular errors).\n- `.xlsx` saved to `outputs\u002F\u003Cunique_thread_id>\u002F`.\n- Layout is organized, legible, and aligned to request style (or default formatting baseline).\n\n# Verification Rules\nBefore final response, verify values\u002Fformulas and visual quality.\n\n1. Inspect key ranges:\n```js\nconst check = await workbook.inspect({\n  kind: \"table\",\n  range: \"Dashboard!A1:H20\",\n  include: \"values,formulas\",\n  tableMaxRows: 20,\n  tableMaxCols: 12,\n});\nconsole.log(check.ndjson);\n```\n\nInspect targeting:\n- Prefer sheet-qualified ranges (`\"Sheet!A1:H20\"`) or `sheetId`.\n\n2. Scan formula errors:\n```js\nconst errors = await workbook.inspect({\n  kind: \"match\",\n  searchTerm: \"#REF!|#DIV\u002F0!|#VALUE!|#NAME\\\\?|#N\u002FA\",\n  options: { useRegex: true, maxResults: 300 },\n  summary: \"final formula error scan\",\n});\nconsole.log(errors.ndjson);\n```\n\n3. Render sheets\u002Franges to verify visual output (skip if already verified and no style changes):\n```js\nconst blob = await workbook.render({ sheetName: \"Sheet1\", range: \"A1:H20\", scale: 2 });\n```\nMake sure you do at least one visual pass of all the sheets in the workbook before the final export.\n\nVisual requirements:\n- Fix severe defects before finalizing: blank\u002Fbroken charts, clipped key headers or numbers, unreadable colors, obvious formula errors, default blank sheets, or content outside the visible working area.\n- Ensure logical labels or titles appear once, texts are all clearly visible, and merged ranges exist where labels or content intentionally span multiple columns.\n- Do one focused visual repair pass after the initial render. Do not spend additional passes on minor polish once the workbook is correct, legible, and exported; note any minor limitation briefly and finalize.\n\n4. Keep verification compact:\n- Inspect key ranges.\n- Avoid huge NDJSON dumps.\n\n5. Export:\n```js\nawait fs.mkdir(outputDir, { recursive: true });\nconst output = await SpreadsheetFile.exportXlsx(workbook);\nawait output.save(`${outputDir}\u002Foutput.xlsx`);\n```\n\n6. Finalize immediately after successful export + compact verification.\n- Do not export extra `.xlsx` variants unless asked.\n- Do not keep iterating on alternate designs once requirements are met, unless asked.\n\n# Additional Instructions\nRead the following templates instructions ONLY when a request relates to any of the following:\n- Investment banking, company financial models, valuation, multi-statement forecasts, or source-backed financial filing analysis: templates\u002Ffinancial_models.md\n\nDo not load these for other tasks that are unrelated unless the prompt explicitly asks for it.\n\n# Source and PDF Extraction\n- For PDF or 10-K\u002F10-Q style inputs, can read PDF via python library `pypdf`, if available, then use one small structured extraction script to collect all required facts into a dict\u002FJSON object. Avoid many ad hoc `rg`\u002F`sed` passes over the same text.\n- Keep source notes compact: record file name, section\u002Ftable label, and enough context to audit the number. Do not paste large PDF excerpts into the workbook unless requested.\n\n# Using artifact_tool APIs (JavaScript)\n\n## Required Imports + Startup\n\nImport existing workbook only when needed:\n```js\nimport { FileBlob, SpreadsheetFile } from \"@oai\u002Fartifact-tool\";\n\nconst input = await FileBlob.load(\"path\u002Fto\u002Finput.xlsx\");\nconst workbook = await SpreadsheetFile.importXlsx(input);\n```\n\nImport CSV text directly when the source or intermediate data is CSV:\n```js\nimport fs from \"node:fs\u002Fpromises\";\nimport { Workbook } from \"@oai\u002Fartifact-tool\";\n\nconst csvText = await fs.readFile(\"path\u002Fto\u002Finput.csv\", \"utf8\");\nconst workbook = await Workbook.fromCSV(csvText, { sheetName: \"Sheet1\" });\n```\nPrefer `Workbook.fromCSV(...)` over hand-parsing CSV rows; clean or analyze CSV with Python\u002FNode first only when needed.\n\nCreate new workbook:\n```js\nimport fs from \"node:fs\u002Fpromises\";\nimport { SpreadsheetFile, Workbook } from \"@oai\u002Fartifact-tool\";\n\nconst workbook = Workbook.create();\nconst sheet = workbook.worksheets.add(\"Inputs\");\n```\n\nFinal export:\n```js\nawait fs.mkdir(outputDir, { recursive: true });\nconst output = await SpreadsheetFile.exportXlsx(workbook);\nawait output.save(`${outputDir}\u002Foutput.xlsx`);\n```\n\n## Build Rules\n- Prefer block writes (`range.values`, `range.formulas`) over per-cell loops. Matrix shape must match the target range (for example `\"D4:M4\"` should be a 1x10 matrix, row x col).\n- Seed scalar formulas once, then `fillDown()` \u002F `fillRight()`. For dynamic-array formulas (`SEQUENCE`, `UNIQUE`, `FILTER`, `SORT`, `VSTACK`, `HSTACK`), write only the anchor cell and let the result spill after.\n- Use `range.displayFormulas` plus `range.formulaInfos` when you need to understand a spill child or a data-table output cell.\n- You do not need to call recalculate; calculation automatically happens.\n- Date handling:\n  - Prefer real `Date` objects for sortable\u002Fcharted\u002Fformula date columns.\n  - Apply date formats explicitly (for example `yyyy-mm-dd`).\n- Use JSON-serializable values for non-Date cells: `string | number | boolean | null`.\n- If a cell is intended to display literal text that begins with `=`, write it as a value prefixed with a single quote (for example `'=B2*C2`). This includes formula descriptions, validation examples, and labels; do not write these cells through `range.formulas`.\n- Create every worksheet referenced by formulas before writing any cross-sheet formulas.\n- When rebuilding dashboards, delete drawings first with `sheet.deleteAllDrawings()`. `range.clear()` does not remove charts, shapes, or images.\n- Verify with `await workbook.inspect(...)`; use `workbook.help(...)` only when the quick surface below is insufficient.\n\n## Conventions\n- Use camelCase API names and option keys.\n- Cell\u002Frange addressing: A1 notation (`sheet.getRange(\"A1:C10\")`).\n- Drawing anchors (`sheet.charts`, `sheet.shapes`, `sheet.images`): 0-based `{ row, col }`.\n- Drawing offsets\u002Fextents use pixels (`rowOffsetPx`, `colOffsetPx`, `widthPx`, `heightPx`).\n\n## Discovery Policy (Strict)\n- Use this quick API surface first.\n- Use `workbook.help(...)` only when blocked by uncertainty.\n- For help queries, start with exact feature\u002Fpath lookups (`chart`, `worksheet.getRange`, `worksheet.freezePanes`, `range.dataValidation`, `chart.series.add`). If an exact path fails, one broader wildcard search is allowed.\n- Do not repeat semantically similar help queries.\n- If one help query returns 0 matches, reformulate once, then proceed best-effort.\n- `render` can be used to examine an existing workbook visually and for visual verifications.\n\nUseful help calls:\n```js\nconsole.log(workbook.help(\"shape.add\", { include: \"examples,notes\" }).ndjson);\nconsole.log(\n  workbook.help(\"*\", {\n    search: \"fill|borders|autofit\",\n    include: \"index,examples,notes\",\n    maxChars: 6000,\n  }).ndjson,\n);\n```\n\n## Reading existing\u002Fimported workbooks\n- On existing\u002Fimported workbooks, get a compact summary via `inspect` to understand what already exists and where.\n- Prefer `inspect(...)` for workbook understanding and discovery across broad areas.\n- Prefer direct getters like `range.formulas` when you already know the target range and need the exact rectangular formula matrix.\n- If formula locations are unknown, prefer `inspect({ kind: \"formula\", ... })` over reading `range.formulas` across a very large area.\n- Prefer to set `maxChars`, `tableMaxRows`, `tableMaxCols`, and\u002For `maxResults` to prevent large dumps of data.\n\n### Inspect for workbook understanding\n- Compact summary:\n```js\nawait wb.inspect({\n  kind: \"workbook,sheet,table\",\n  maxChars: 6000,\n  tableMaxRows: 6,\n  tableMaxCols: 6,\n  tableMaxCellChars: 80,\n});\n```\n- Quick overview of sheet ids and names: `await wb.inspect({ kind: \"sheet\", include: \"id,name\" })`\n- Formula discovery in a targeted area: `await wb.inspect({ kind: \"formula\", sheetId: firstSheetName, range: \"A1:Z30\", maxChars: 2500, options: {maxResults:50} })`\n- Checking existing styles in a targeted area: `await wb.inspect({ kind: \"computedStyle\", sheetId: firstSheetName, range: \"A1:E10\", maxChars: 2500 })`\n- Common `kind` tokens: `workbook`, `sheet`, `table`, `region`, `match`, `formula`, `thread`, `computedStyle`, `definedName`, `drawing`\n- Inspects can also be used to zoom in on specific areas, especially for target edits:\n```js\nawait wb.inspect({\n  kind: \"region\",\n  sheetId: firstSheetName,\n  range: \"A1:Z30\",\n  maxChars: 2500,\n});\n```\n- Inspect output may include JSON records with `\"id\"` values (for example `\"ws\u002Fr5qsk5\"`), which you can resolve back to workbook objects with `wb.resolve(...)`:\n- `wb.resolve(\"ws\u002F...\")` -> worksheet\n- `wb.resolve(\"th\u002F...\")` -> comment thread\n\n## Additional feature-specific notes\n\n### Merging cells\n- Merging cells is useful for headers, dashboards, visual descriptors, and other multi-cell labels.\n- If you plan to set a range of cells to a single value, consider merging those cells first.\nFor example:\n```js\nconst range = sheet.getRange(\"I23:N24\");\nrange.merge();\nrange.values = [[\"Some long description that should cross multiple cells\"]];\n```\n\n## Known Gotchas (Do Not Repeat)\n- Do not set undocumented attributes on remote objects.\n- `Workbook.create()` starts with no sheets; add one before calling `getActiveWorksheet()`.\n- Use matrix sizes that match target ranges unless you intentionally spill.\n- If a formula appears unsupported, use an alternate equivalent.\n- For cross-sheet formulas in a newly created workbook, create all referenced worksheets first, then write formulas. Avoid writing formulas that reference sheets that have not been added yet.\n- Avoid full-column formula references such as `A:A`, `$A:$A`, or `Sheet!B:B`. Prefer bounded ranges sized to the editable table, e.g. `$A$6:$A$205`, especially inside `COUNTIFS`, `SUMIFS`, `INDEX`, and lookup formulas.\n- If export fails, isolate the cause by checkpoint-exporting after each major feature block: base sheets, values\u002Fformulas, formatting, conditional formatting, tables, charts\u002Frendering. Do this before rewriting the workbook.\n- If export fails with `invalid int32: NaN` or another serialization error after formatting or charts, do not rerun the same script unchanged. First remove or simplify optional drawing\u002Fchart\u002Fstyle details in this order: nested\u002Fcustom border configs, custom chart axis\u002Fstyle mutations, broad row\u002Fcolumn formatting\u002Fautofit calls, then nonessential drawings. Preserve values\u002Fformulas and keep or retry a minimal helper-range chart when the prompt needs charts; only drop all charts\u002Fdrawings if the simplified chart still prevents export.\n- Prefer fills, font hierarchy, spacing, and section bands over complex nested border objects. If you use borders, start with a minimal preset or a very simple thin\u002Flight border on a bounded range and checkpoint export before applying borders widely. Avoid nested `inside`\u002F`around`\u002F`outline` border configs and border `weight` settings unless you have already checkpoint-exported that exact pattern successfully.\n- For chart-heavy dashboards, checkpoint export after the first basic helper-range chart before adding multiple charts or optional axis\u002Fformatting mutations. If a chart export failure happens twice, keep the cleanest minimal chart that exports or replace the failing chart with a clearly labeled helper table\u002FKPI block rather than spending the task on repeated chart debugging.\n- Keep formatting and formulas on bounded ranges. Avoid whole-row or whole-column formatting\u002Fautofit for generated workbooks unless you have verified the export immediately afterward.\n\n## Quick API Surface (High-Value + Common)\n\n### Core workbook\u002Ffile APIs\n- `import { FileBlob, SpreadsheetFile, Workbook } from \"@oai\u002Fartifact-tool\"`\n- `const workbook = Workbook.create(); const sheet = workbook.worksheets.add(\"Sheet1\")`\n- `const workbook = await SpreadsheetFile.importXlsx(arrayBufferOrFileBlob)`\n- `const xlsx = await SpreadsheetFile.exportXlsx(workbook); await xlsx.save(\"output.xlsx\")`\n- `const inspect = await workbook.inspect({ kind: \"sheet\", include: \"id,name\", sheetId, range: \"A1:C10\" })`\n- `const help = workbook.help(\"worksheet.getRange\", { include: \"index,examples\" })`\n- Preferred: `const blob = await workbook.render({ sheetName: \"Sheet1\", autoCrop: \"all\", scale: 1, format: \"png\" })`\n- To get the bytes and\u002For save the blob to file: \n```js\nconst previewBytes = new Uint8Array(await preview.arrayBuffer()); \nawait fs.writeFile(`${outputDir}\u002Fpreview.png`, previewBytes);\n```\n- `const workbook = await Workbook.fromCSV(csvText, { sheetName: \"Sheet1\" })`\n- `await workbook.fromCSV(csvText, { sheetName: \"ImportedData\" })`\n\n### Worksheet selection\u002Fcreation\n- `workbook.worksheets.add(name)`\n- `workbook.worksheets.getItem(name)`\n- `workbook.worksheets.getOrAdd(name, { renameFirstIfOnlyNewSpreadsheet: true })`\n- `workbook.worksheets.getItemAt(index)`\n- `workbook.worksheets.getActiveWorksheet()` (only after at least one sheet exists)\n\n### Worksheet operations\n- `sheet.getRange(\"A1:C10\")`, `sheet.getRangeByIndexes(startRow, startCol, rowCount, colCount)`, `sheet.getCell(row, col)`\n- `sheet.getUsedRange(valuesOnly?)`\n- `sheet.mergeCells(\"A1:C1\")`, `sheet.unmergeCells(\"A1:C1\")`\n- `sheet.freezePanes.freezeRows(1)`, `sheet.freezePanes.freezeColumns(2)`, `sheet.freezePanes.unfreeze()`\n- `sheet.tables`, `sheet.charts`, `sheet.sparklineGroups` (`sheet.sparklines` alias), `sheet.shapes`, `sheet.images`\n- `sheet.showGridLines = false`\n- `sheet.dataTables`, `sheet.conditionalFormattings`, `sheet.dataValidations`\n- `sheet.deleteAllDrawings()` removes charts, shapes, and images before a dashboard rebuild.\n\n### Range values\u002Fformulas\n- `const range = sheet.getRange(\"A1:C10\")`\n- `range.values = [[...], ...]` (2D matrix of values)\n- `range.formulas = [[\"=...\"], ...]`\n- `range.formulasR1C1 = [[\"=RC[-1]*2\"]]`\n- To read: `range.values` \u002F `range.formulas` \u002F `range.displayFormulas` \u002F `range.formulaInfos` (for spill\u002Farray formulas)\n- `range.write(matrixOrPayload)` (auto-sizes\u002Fspills from anchor as needed)\n- `range.writeValues(matrixOrRows)`\n- `range.fillDown()`, `range.fillRight()`\n  - `sheet.getRange(\"D2\").formulas = [[\"=...\"]]`\n  - `sheet.getRange(\"D2:D200\").fillDown()`\n- `range.clear({ applyTo: \"contents\" | \"formats\" | \"all\" })`\n- `range.copyFrom(sourceRange, \"values\" | \"formulas\" | \"all\")` source and destination must have the same shape\n- `range.copyTo(destRange, \"values\" | \"formulas\" | \"all\")`\n- `range.offset(...)`, `range.resize(...)`, `range.getCurrentRegion()`, `range.getRow(i)`, `range.getColumn(j)`\n- `range.getRangeByIndexes(...)`, `range.getCell(...)`\n- `range.merge()`, `range.merge(true)` to merge across, `range.unmerge()`\n\n### Formatting\n- `range.format` supports `fill`, `font`, `numberFormat`, `borders`, alignments, `wrapText`\n- `range.format.autofitColumns()`, `range.format.autofitRows()`\n- `range.format.columnWidth = 18`, `range.format.rowHeight = 24`\n- `range.format.columnWidthPx = 120`, `range.format.rowHeightPx = 24`\n- `range.setNumberFormat(\"yyyy-mm-dd\")`\n- `range.format.numberFormat = [[\"0\"], [\"0.00\"], [\"@\"]]`\n\n### Validation + conditional formatting\n- `range.dataValidation = { rule: { type: \"list\", formula1: \"Categories!$A$2:$A$4\" } }`\n- `range.dataValidation = { rule: { type: \"list\", values: [\"Not Started\", \"In Progress\"] } }`\n- `sheet.dataValidations.add({ range: \"B2:B100\", rule: { type: \"whole\", operator: \"between\", formula1: 1, formula2: 10 } })`\n- `range.conditionalFormats.add(type, config)`\n- `range.conditionalFormats.addCustom(formula, format)`\n- `range.conditionalFormats.addCellIs({...})`\n- `range.conditionalFormats.addDataBar({...})`\n- `range.conditionalFormats.addColorScale({...})`\n- `range.conditionalFormats.deleteAll()` \u002F `range.conditionalFormats.clear()`\n- `sheet.conditionalFormattings.add({ range, rule })`\n\n```js\nconst r = sheet.getRange(\"B2:B20\");\nr.conditionalFormats.addCellIs({\n  operator: \"lessThan\",\n  formula: 0,\n  format: { font: { color: \"#DC2626\" } },\n});\nr.conditionalFormats.addCustom(\"=B2\u003C0\", { fill: \"#FECACA\" });\nr.conditionalFormats.addColorScale({\n  minColor: \"#FEE2E2\",\n  midColor: \"#FEF3C7\",\n  maxColor: \"#DCFCE7\",\n});\nr.conditionalFormats.addDataBar({ color: \"accent5\", gradient: true });\n```\n\n### Tables\n- Rules: When adding new tables, set explicit unique names (`TasksTable`, `SummaryTable`).\n- You cannot have multiple tables over the same range. Before adding a table on an existing\u002Fimported workbook, confirm the target range does not already overlap an existing table. Prefer the initial compact `inspect` summary over a separate tables-only scan when available.\n- `const table = sheet.tables.add(\"A1:H200\", true, \"TasksTable\")`\n- `table.rows.add(null, [[...], ...])`, `table.getDataRows()`, `table.getHeaderRowRange()`\n- Read tables: `sheet.tables.items` -> `Table[]`\n- Set + Getters: `table.name`, `table.style`, `table.style`, `table.showHeaders`\n- Toggles for table utilities (set\u002Fget): `table.showTotals`, `table.showBandedColumns = true`, `table.showFilterButton`\n- `table.delete()`\n\n### Charts\n- Rules: When adding or moving charts, do not cover existing data. Put charts in a reserved rectangle with blank gutter columns\u002Frows around the chart area.\n- Fast chart path, no help lookup needed for common line\u002Fbar\u002Fscatter charts: write a compact helper range with text categories and one column per series, then chart that range.\n```js\nsheet.getRange(\"F4:H7\").values = [\n  [\"Month\", \"Revenue\", \"EBITDA\"],\n  [\"Jan\", 100, 10],\n  [\"Feb\", 120, 18],\n  [\"Mar\", 130, 22],\n];\nconst chart = sheet.charts.add(\"line\", sheet.getRange(\"F4:H7\"));\nchart.setPosition(\"J4\", \"Q20\");\nchart.title = \"Revenue and EBITDA Trend\";\nchart.hasLegend = true;\nchart.xAxis = { axisType: \"textAxis\" };\nchart.yAxis = { numberFormatCode: \"$#,##0\" };\n```\n- Fast chart path from range: `const chart = sheet.charts.add(\"line\", sourceRange)` when the source range already has headers and text x-axis labels.\n- Avoid manual `chart.series.add(...)` and `chart.legend = {...}` on the first pass, unless source-range based chart creation does not work (for example, non-continuous data). Use a helper range chart first, then add optional chart styling only if the basic chart renders and exports cleanly.\n- If you want to set specific chart props after the helper-range path is not enough: `const chart = sheet.charts.add(\"bar\", chartProps)`, then checkpoint export before adding optional styling.\n- If using compat positioning, always set position: `chart.setPosition(\"F2\", \"M20\")`.\n- `sheet.charts.getItemOrNullObject(\"Chart 1\")`, `sheet.charts.deleteAll()`\n- To update x\u002Fy-axis, prefer compact config assignments such as `chart.xAxis = { axisType: \"textAxis\", tickLabelInterval: 2 }` and `chart.yAxis = { numberFormatCode: \"$#,##0\" }`. These help legibility and visibility.\n- For month\u002Fdate x-axes, prefer a chart helper range with text labels such as `Jan 2025` or `2025-01`. Do not rely on date axis number formats alone; rendered previews can show Excel serial numbers.\n- Chart types: `\"bar\" | \"line\" | \"area\" | \"pie\" | \"doughnut\" | \"scatter\" | \"bubble\" | \"radar\" | \"stock\" | \"treemap\" | \"sunburst\" | \"histogram\" | \"boxWhisker\" | \"waterfall\" | \"funnel\" | \"map\"`.\n\n### Sparklines\n- `sheet.sparklines.add({...})`, `sheet.sparklines.clear()`, `sheet.sparklines.deleteAll()` (`sheet.sparklineGroups` is the worksheet-scoped alias)\n\n### Help \u002F Grep\nUse `workbook.help(...)` primarily for obscure\u002Fadvanced surfaces (for example deep chart axis settings, unusual drawing configs, pivot APIs, or uncommon option schemas).\n- `workbook.help(\"enum.ShapeGeometry\", { include: \"index,notes\" }).ndjson`\n- `workbook.help(\"enum.*\", { search: \"ShapeGeometry|LineStyle\", include: \"index\" }).ndjson`\n- `workbook.help(\"shape.add\", { include: \"examples,notes\" }).ndjson`\n- `workbook.help(\"*\", { search: \"fill|borders|autofit\", include: \"index,examples,notes\", maxChars: 6000 }).ndjson`\n\n\n### JavaScript example snippet (runnable)\n\n```js\nimport fs from \"node:fs\u002Fpromises\";\nimport { SpreadsheetFile, Workbook } from \"@oai\u002Fartifact-tool\";\n\nasync function quickApiExample() {\n  const workbook = Workbook.create();\n  var sheet = workbook.worksheets.add(\"ExampleSheet\");\n\n  sheet = workbook.worksheets.getItem(\"ExampleSheet\");\n  sheet.getRange(\"A1:D4\").values = [\n    [\"Name\", \"Personality Type\", \"Age\", \"Birthday\"],\n    [\"John Doe\", \"Introvert\", 30, new Date(\"1990-01-01T00:00:00Z\")],\n    [\"Jane Smith\", \"Extrovert\", 25, new Date(\"1995-02-15T00:00:00Z\")],\n    [\"Jim Very Long Name\", \"Ambivert\", 40, new Date(\"1980-03-20T00:00:00Z\")],\n  ];\n  sheet.getRange(\"E1\").values = [[\"Score\"]];\n  sheet.getRange(\"E2\").formulas = [[\"=C2*10\"]]; \u002F\u002F score is 10 * age\n  sheet.getRange(\"E2:E10\").fillDown();\n  const headerRange = sheet.getRange(\"A1:E1\");\n\n  \u002F\u002F Styling\n  const headerFormats = {\n    fill: \"#0F766E\",\n    font: { bold: true, color: \"#FFFFFF\" },\n    horizontalAlignment: \"center\",\n    verticalAlignment: \"center\",\n    rowHeight: 16,\n  };\n  headerRange.format = headerFormats;\n  headerRange.format.autofitColumns();\n\n  const dataRange = sheet.getRange(\"A2:D10\");\n  dataRange.format.wrapText = true;\n  sheet.showGridLines = false;\n\n  \u002F\u002F Format dates properly.\n  sheet.getRange(\"D2:D10\").format.numberFormat = \"MM\u002FDD\u002FYYYY\";\n\n  \u002F\u002F Conditional formatting\n  sheet.getRange(\"C2:C10\").conditionalFormats.addDataBar({\n    color: \"#704023\",\n    gradient: true,\n  });\n  sheet.getRange(\"E2:E10\").conditionalFormats.add(\"cellIs\", {\n    operator: \"greaterThan\",\n    formula: 300,\n    format: { font: { color: \"#B91C1C\" } },\n  });\n  sheet.conditionalFormattings.add({\n    range: \"B2:B10\",\n    rule: {\n      type: \"expression\",\n      formula: '=B2=\"Introvert\"',\n      format: { fill: \"#FCA5A5\" },\n    },\n  });\n\n  \u002F\u002F Data validation: Since Personality Type is a dropdown category, add data validation.\n  sheet.getRange(\"B2:B10\").dataValidation = {\n    rule: {\n      type: \"list\",\n      values: [\"Introvert\", \"Extrovert\", \"Ambivert\"],\n      \u002F\u002F formula1: \"CategoriesSheet!$A$2:$A$4\", \u002F\u002F Alternative: reference a tunable list\n    },\n  };\n\n  \u002F\u002F Tables: Turn it into a table (for example purposes! Make sure table names are unique)\n  \u002F\u002F NOTE: If hasHeaders=true, the range must include the header row.\n  const table = sheet.tables.add(\"A1:E10\", true, \"PeopleTable\");\n  table.getHeaderRowRange();\n\n  \u002F\u002F First column is still wide since we only auto-fit the first row. Expand it manually.\n  sheet.getRange(\"A1:A10\").format.columnWidth = 20;\n\n  \u002F\u002F Create charts to the right of the table\n  sheet.getRange(\"H1:O1\").merge();\n  sheet.getRange(\"H1\").values = [[\"Charts\"]];\n  sheet.getRange(\"H1\").format = headerFormats;\n\n  \u002F\u002F Adding charts\n  const chart = sheet.charts.add(\"bar\", {\n    from: { row: 1, col: 7 },\n    extent: { widthPx: 620, heightPx: 320 },\n  });\n  chart.title = \"Person by Scores\";\n  chart.hasLegend = true;\n  chart.displayBlanksAs = \"zero\";\n  chart.legend.position = \"right\";\n  chart.barOptions.direction = \"column\";\n  chart.barOptions.grouping = \"clustered\";\n  const sheetRef = sheet.name.replaceAll(\"'\", \"''\");\n  const dataEndRow = 4; \u002F\u002F Keep chart refs to rows with data only.\n\n  const scoreSeries = chart.series.add(\"Scores by Person\");\n  scoreSeries.categoryFormula = `'${sheetRef}'!$A$2:$A$${dataEndRow}`;\n  scoreSeries.formula = `'${sheetRef}'!$E$2:$E$${dataEndRow}`;\n  scoreSeries.valuesFormatCode = \"0\";\n  chart.setPosition(\"H2\", \"O16\");\n\n  \u002F\u002F Granular control over chart axes\n  chart.xAxis = {\n    axisType: \"textAxis\",\n    title: { text: \"Person\", textStyle: { fontSize: 13, bold: true } },\n    position: \"bottom\",\n    orientation: \"minMax\",\n    textStyle: { fontSize: 10 },\n  };\n  chart.yAxis = {\n    axisType: \"textAxis\",\n    title: { text: \"Scores\", textStyle: { fontSize: 13, bold: true } },\n    numberFormatCode: \"0,000\",\n    numberFormatSourceLinked: false,\n  };\n\n  \u002F\u002F Chart 2 - Fastest path with defaults\n  const chart2 = sheet.charts.add(\"line\", sheet.getRange(\"B2:C4\"));\n  chart2.title = \"Scores by Personality\";\n  chart2.setPosition(\"H20\", \"O35\");\n\n  \u002F\u002F Sparklines: add to the right of table\n  const sparklinesHeader = sheet.getRange(\"F1\");\n  sparklinesHeader.values = [[\"Sparklines\"]];\n  sparklinesHeader.format = headerFormats;\n  sparklinesHeader.format.autofitColumns();\n\n  sheet.sparklines.add({\n    type: \"column\", \u002F\u002F \"line\" | \"column\" | \"stacked\"\n    sourceData: sheet.getRange(\"E2:E10\"),\n    targetRange: sheet.getRange(\"F2:F10\"),\n    seriesColor: \"#AAAAAA\",\n  });\n\n  \u002F\u002F Render\n  await fs.mkdir(\"output\", { recursive: true });\n  const pngBlob = await workbook.render({\n    sheetName: \"ExampleSheet\",\n    autoCrop: \"all\",\n    scale: 1,\n    format: \"png\",\n  });\n  const pngBytes = new Uint8Array(await pngBlob.arrayBuffer());\n  await fs.writeFile(\"output\u002Fexample_sheet.png\", pngBytes);\n  console.log(\"Rendered first sheet to 'output\u002Fexample_sheet.png'\");\n\n  \u002F\u002F Export\n  const out = \"output\u002Fexample_sheet.xlsx\";\n  const xlsx = await SpreadsheetFile.exportXlsx(workbook);\n  await xlsx.save(out);\n}\n\nawait quickApiExample();\n```\n\nRender:\n```js\nconst imageBlob = await workbook.render({\n  sheetName: \"ExampleSheet\",\n  autoCrop: \"all\",\n  scale: 1,\n  format: \"png\",\n});\n```\n\nExport:\n```js\nconst xlsx = await SpreadsheetFile.exportXlsx(workbook);\nawait xlsx.save(\"output\u002Fspreadsheet.xlsx\");\n```\n",{"name":5,"description":7},"main","dde9a06ab10bce3fe52058c783826590231f7df3","plugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api","https:\u002F\u002Fgithub.com\u002Fwxdwu","24120128@bjtu.edu.cn","I am Xudong Wu，a student in beijing jiaotong University, \"I am eager to learn on GitHub and contribute my part to this community.","2026-10-05 17:26:50",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add wxdwu\u002Fnew-api --skill Excel",{"tool":38,"command":39},"bunx","bunx skills add wxdwu\u002Fnew-api --skill Excel",{"tool":41,"command":42},"pnpm","pnpm dlx skills add wxdwu\u002Fnew-api --skill Excel","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe\u002FSKILL.md",true,[46,52,58,62],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",336,"https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe\u002Fagents\u002Fopenai.yaml",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"assets\u002Ffile-spreadsheet.png","ASSET","资产文件",1306,"https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe\u002Fassets\u002Ffile-spreadsheet.png",{"path":59,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":60,"sourceHtmlUrl":61},"style_guidelines.md",9291,"https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe\u002Fstyle_guidelines.md",{"path":63,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":64,"sourceHtmlUrl":65},"templates\u002Ffinancial_models.md",2528,"https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Flegacy-primary-runtime-skills\u002Fspreadsheets-1781234065474-fbd734cf-25f8-49b5-b841-2303a925fffe\u002Ftemplates\u002Ffinancial_models.md",[67,74,81,88,95,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7E8SVA2N0JA09RW1XJYXCWX","Zotero","Use Zotero Desktop from Codex to enable\u002Fprobe the local API, search a local Zotero library, list items\u002Fcollections\u002Ftags, export BibTeX, insert citation keys into LaTeX or Markdown drafts, read indexed full text when requested, and import BibTeX\u002FRIS records into Zotero through the connector server. Use when the user mentions Zotero, citations, references.bib, BibTeX export, local Zotero API, localhost:23119, or adding citations from a Zotero library.","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Fplugins\u002Fplugins\u002Fzotero\u002Fskills\u002Fzotero\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7E8ST1FJAD5PWTW2FN1NSK0","zoom-apps-sdk","Use when using Apps SDK.","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Fplugins\u002Fplugins\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7E8SRW074NNNCZRCZA5T3Z1","setup-zoom-websockets","Use when building Zoom WebSockets.","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Fplugins\u002Fplugins\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7E8SPCFMD3YVPRX2MW8X3RA","setup-zoom-webhooks","Use when building Zoom webhooks.","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Fplugins\u002Fplugins\u002Fzoom\u002Fskills\u002Fwebhooks\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7E8SMCH4RPCX8YSBNGWQCMP","zoom-virtual-agent-web","Zoom Virtual Agent SDK for web embeds. Use for campaign or entry ID chat launch, event-driven controls, user context updates, and CSP-safe deployment.","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Fplugins\u002Fplugins\u002Fzoom\u002Fskills\u002Fvirtual-agent\u002Fweb\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7E8SJCAY323E36Z8SAP8H4M","zoom-virtual-agent-ios","Zoom Virtual Agent iOS integration via WKWebView. Use for Swift\u002FObjective-C script injection, message handlers, support_handoff relay, and URL routing policies.","https:\u002F\u002Fgithub.com\u002Fwxdwu\u002Fnew-api\u002Fblob\u002Fmain\u002Fplugins\u002F.tmp\u002Fplugins\u002Fplugins\u002Fzoom\u002Fskills\u002Fvirtual-agent\u002Fios\u002FSKILL.md",[],[]]