옵션

스프레드시트 파일이 주요 입력 또는 출력인 경우 언제든지 이 기술을 활용하십시오. 즉, 사용자가 다음 작업을 수행하고자 할 때를 의미합니다: 기존 .xlsx, .xlsm, .xltx, .csv 또는 .tsv 파일을 열거나, 읽거나, 편집하거나, 수정하는 작업(예: 열 추가, 수식 계산, 서식 지정, 차트 작성, 불규칙한 데이터 정리); 처음부터 또는 다른 데이터 소스를 기반으로 새로운 스프레드시트를 생성하거나, 표 형식 파일 간 변환을 수행하려는 모든 작업이 해당됩니다. 특히 사용자가 스프레드시트 파일의 이름이나 경로를 참조할 때(예: “내 다운로드 폴더에 있는 xlsx 파일”) — 심지어 “내 다운로드 폴더에 있는 xlsx 파일”과 같이 무심코 언급하는 경우라도 — 해당 파일에 대한 작업을 수행하거나 파일을 생성하고자 할 때 트리거됩니다. 또한 형식이 잘못된 행, 잘못 배치된 헤더, 불필요한 데이터 등 정리가 필요한 표 형식 데이터 파일을 적절한 스프레드시트로 정리하거나 재구성하는 경우에도 적용됩니다. 결과물은 반드시 스프레드시트 파일이어야 합니다. 표 형식 데이터가 포함되어 있더라도, 주요 결과물이 Word 문서, HTML 보고서, 독립 실행형 Python 스크립트, 데이터베이스 파이프라인 또는 Google 스프레드시트 API 통합인 경우에는 트리거하지 마십시오.

...모든 것을 확장하십시오
58
업데이트 된 시간 2026년 8월 11일

XLSX 생성, 편집 및 분석

openpyxl, pandas, markitdown은 미리 설치되어 있습니다. 먼저 pip install을 실행하지 마시고, 스크립트를 작성한 후 직접 임포트하십시오. 임포트가 실패하거나(또는 markitdown 명령어가 없는 경우)에만 누락된 패키지를 pip install로 설치하십시오.

아래 스크립트 경로는 이 스킬의 디렉터리를 기준으로 한 상대 경로입니다.

모든 출력에 대한 요구 사항

  • 사용자가 별도로 지정하지 않는 한, 전체적으로전문용 글꼴 (Arial, Times New Roman)을 사용하십시오.
  • 수식 오류가 없어야 합니다. recalc.py에서 errors_found를 보고하는 상태에서는 절대 배포하지 마십시오. 오류가 본인이 작업하기 전부터 존재했다고 생각되면 이를 증명하십시오: data_only=True로 원본을 불러와 해당 셀을 확인하십시오. 본인이 유발한 오류는 상속받은 오류와 정확히 똑같이 보입니다.
  • 수식을 사용하고, 절대 결과를 하드코딩하지 마십시오. Python으로 계산된 합계가 아닌 sheet['B10'] = '=SUM(B2:B9)'와 같이 작성하십시오. 입력값이 변경되면 시트가 재계산되어야 합니다.
  • 사용자의 사양을 문자 그대로 따르십시오. 정확한 탭 이름, 정확한 열 머리글, 그리고 사용자가 명시한 수식을 그대로 사용하십시오. 다른 값을 계산하는 재설계는 아무리 우아하더라도 실패합니다.
  • 모든 가정과 하드코딩된 숫자는 독자가 볼 수 있는 곳(셀 주석이나 표 끝의 인접 셀 등)에문서화하십시오. 실제 출처가 있다면 이를 인용하십시오(출처: 회사 10-K, 2024 회계연도, 45페이지, 매출 관련 주석, [SEC EDGAR URL]); 숫자가 사용자로부터 나온 것이라면 그 사실을 명확히 밝히십시오.
  • 다른 사람이 내용을 입력하도록 만든 워크북에는 편집해야 할 셀을 명시하는 간단한 설명과, 예상되는 형식을 보여주는 실제 값이 포함된 예시 행 하나가 필요합니다. 편집을 의뢰받은 파일에는 절대 이러한 예시 행을 추가하지 마십시오.
  • 기존 파일 편집 시: 해당 파일의 규칙을 정확히 따르십시오. 이 규칙들은 본 문서의 모든 지침보다 우선합니다. 먼저 지정된 입력 셀을 찾아보세요 — 독특한 글꼴 색상, 채우기 색상 또는 음영으로 표시되어 있습니다 — 해당 셀에만 입력하고, 기존 수식은 절대 수정하지 마십시오.

재계산 (파일에 수식이 포함된 경우 반드시 수행해야 함)

openpyxl은 수식을 캐시된 값이 없는 문자열로 작성합니다. 재계산을 수행하기 전까지는 모든 수식 셀이 캐시된 값을 읽는 도구( pandas, load_workbook(data_only=True), 그리고 대부분의 미리보기 도구)에 대해 None으로 반환됩니다.

python scripts/recalc.py 출력.xlsx [timeout_seconds]   # 기본값 30

LibreOffice가 모든 수식을 계산하고, 파일이 원본 위치에 다시 쓰이며, 다음과 같은 JSON을 얻게 됩니다: status (success | errors_found), total_formulas, total_errors, 그리고 오류 유형별로 최대 100개의 셀을 나열한error_summary가 포함됩니다(locations_truncated는 생략된 셀 수를 나타냅니다 — 목록의 길이가 아닌 total_errors 값을 신뢰하십시오). 지정된 오류를 수정하고 다시 실행하십시오. status 대신 error 키가 포함된 JSON은 재계산이 전혀 이루어지지 않았음을 의미하며, 오직 이 경우에만 0이 아닌 값으로 종료됩니다 — errors_found가 0으로 종료되므로, 정상 종료된 경우를 오류 없는 워크북으로 간주해서는 안 됩니다.

녹색 재계산 표시가 나온다고 해서 수식이 올바르다는 뜻은 아닙니다. 범위가 하나만 어긋나거나 잘못된 행을 참조해도 숫자는 틀리지만 오류가 없는 파일이 생성될 수 있습니다. 표 전체를 작성하기 전에 먼저 2~3개의 수식을 작성하고, 예상한 값이 나오는지 확인하십시오.

다른 파일에 연결된 워크북은 openpyxl을 사용하여 다시 저장한 후 재계산하면해당 연결이 끊어집니다. 이러한 수식은 ='[1]Returns Analysis'!$B$2와 같이 작성됩니다. 여기서 [1] 은 워크북의 외부 참조 목록 내 인덱스로, 시트가 아닌 디스크상의 별도 파일을 지칭합니다. 해당 파일이 여기에 존재하는 경우는 드물기 때문에, 셀의 캐시된 값만이 데이터를 유지하고 있습니다. openpyxl은 저장 시 해당 값을 제거하며, 이에 따라 LibreOffice는 참조를 실제로 해결해야 하지만 실패하여 #NAME?을 출력하고 모든 링크를 삭제합니다. recalc.py는 이러한 상태에서는 실행을 거부합니다 — 덮어쓰기 저장하기 전에 원본에서 해당 셀의 값을 복사해 두십시오(--force 옵션은 이 설정을 무시하고, 데이터 손실을 감수합니다).

검증 과정을 무사히 통과하는 수식 선택하기

LibreOffice는 Excel보다 구현된 함수가 적으며, 평가할 수 없는 함수가 있으면 전달하는 파일에 #NAME? 오류가 그대로 남게 됩니다.

  • 접두사가 필요 없는Excel 2007 시대의 함수 ( SUMIFS, INDEX, MATCH, IFERROR, SUMPRODUCT )를우선적으로 사용하십시오.
  • 2007년 이후의 함수 중 6개는 작동하지만, _xlfn. 접두사가 붙은 경우에만 가능합니다. openpyxl이 수식을 XML에 그대로 기록하고, Excel은 2007년 이후의 함수 이름을 접두사가 붙은 형태로 저장하기 때문입니다(Excel UI에서는 접두사가 숨겨집니다): _xlfn.TEXTJOIN, _xlfn.CONCAT, _xlfn.IFS, _xlfn.SWITCH, _xlfn.MAXIFS, _xlfn.MINIFS. 접두사 없이 작성하면 각각 #NAME? 오류가 발생합니다.
  • XLOOKUP, XMATCH, SORT, FILTER, UNIQUE 또는 SEQUENCE는 절대 사용하지 마십시오. 런타임의 LibreOffice는 어떤 접두사가 붙어도 이 함수들을 평가할 수 없습니다. 최신 빌드에서는 이러한 함수를 평가할 수 있지만, 이들은 스필링 배열 함수이며 openpyxl로 작성된 파일에는 스필 메타데이터가 없기 때문에 범위 중 왼쪽 상단 셀에만 값이 할당됩니다. 그 결과, recalc.py는 잘린 결과에 대해 total_errors: 0을 보고합니다. 조회는INDEX/MATCH를 사용하고, 셀에 값을 기록하기 전에 Python에서 정렬, 필터링 및 중복 제거를 수행하십시오.
  • LibreOffice가 구문 분석할 수 없었던 수식은 소문자로 다시 기록되는데, 이는 #NAME? 오류 옆에서 쉽게 확인할 수 있는 징후입니다.

openpyxl 주의사항

  • 모델을 읽으려면 두 번의 로딩이 필요합니다. data_only=True를 설정하면 수식이 제거된 캐시된 값이 반환되고, 기본값을 사용하면 값이 없는 수식 문자열이 반환됩니다. 한 번의 처리로 두 가지를 모두 얻을 수는 없습니다.
  • 저장 시data_only=True는 파괴적입니다. 해당 워크북에는 수식이 남아 있지 않으므로, 저장 시 모든 수식이 리터럴로 영구적으로 대체됩니다.
  • openpyxl이 방금 쓴 파일에data_only=True를 적용하면 모든 곳에서 None이 반환됩니다 — 먼저 recalc.py를 실행하세요. (결과가 "" 인 수식도 읽을 때 None으로 반환됩니다.)
  • 병합된 셀: 왼쪽 상단 앵커만 기록합니다. 범위 내의 다른 모든 셀은 .value가 읽기 전용인 MergedCell 입니다.
  • load_workbook에 keep_vba=True를 전달하지 않으면.xlsm 파일의 매크로가 손실됩니다.
  • 공백이 포함된 시트 이름은 시트 간 참조 시따옴표로 묶어야 합니다: ='Assumptions Inputs'!$B$5. 따옴표가 없으면 #VALUE! 오류가 발생합니다.

재무 모델

사용자가 달리 지정하지 않거나 기존 파일이 이미 다른 방식으로 처리하고 있는 경우가 아닌 한.

색상: 고정 입력값 및 시나리오 레버에는 파란색 텍스트 (0,0,255) · 수식에는 검은색 · 다른 시트로의 링크는 녹색 (0,128,0) · 다른 파일로의 링크는 빨간색 (255,0,0) · 주요 가정 및 사용자가 직접 입력해야 하는 셀은 노란색 채우기 (255,255,0).

숫자: 통화 형식 $#,##0, 헤더에 단위 명시 (매출 ($mm)) · 0은 -로 표시되며, 백분율도 포함 ($#,##0;($#,##0);-) · 음수는 괄호로 표시 · 백분율은 0.0%로 표시되며, 분수로 저장됨 (0.15는 15.0%로 표시됨; 15를 저장하면 1500.0%로 저장) · 기업 가치 배수 0.0x · 연도는 텍스트로 표시("2024", 2,024로 표시되지 않음).

구조: 모든 가정은 별도의 레이블이 지정된 셀에 기재하며, 이를 사용하는 수식에서 참조 (=B5*(1+$B$6), =B5*1.05는 절대 사용하지 않음) · 모든 예측 기간에 걸쳐 수식이 일관되어야 함. 행 중간에 단 하나의 셀만 수정되는 것이 가장 흔한 숨겨진 오류이기 때문 · 0이 될 수 있는 분모를 보호해야 함.

의존성

openpyxl, pandas, markitdown (pip, 사전 설치됨 — 임포트 실패 시 또는 명령어가 없는 경우에만 설치) · LibreOffice (soffice, scripts/office/soffice.py를 통해 샌드박스 환경에 자동 구성됨)

GitHub에서 보기

XLSX creation, editing, and analysis

openpyxl, pandas, and markitdown are preinstalled — do not run pip install first; write the script and import directly. Only if an import fails (or the markitdown command is missing): pip install the missing package.

Script paths below are relative to this skill's directory.

Requirements for every output

  • Professional font (Arial, Times New Roman) throughout, unless the user says otherwise.
  • Zero formula errors. Never ship while recalc.py reports errors_found. If you think an error predates you, prove it: load the original with data_only=True and look at that cell. An error you introduced looks exactly like one you inherited.
  • Use formulas, never hardcoded results. Write sheet['B10'] = '=SUM(B2:B9)', not the Python-computed total. The sheet must recalculate when its inputs change.
  • Follow the user's spec literally. Exact tab names, exact column headers, and the formula they spelled out. A redesign that computes something else fails, however elegant.
  • Document every assumption and hardcoded number where the reader will see it — a cell comment, or an adjacent cell at a table's end. Cite a real source when one exists (Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]); when the number came from the user, say so plainly.
  • A workbook you create for someone to fill in needs a short legend naming which cells to edit, and one example row of realistic values showing the expected format. Never add such a row to a file you were asked to edit.
  • Editing an existing file: match its conventions exactly. They override every guideline here. Find its designated input cells first — a distinct font color, fill, or shading marks them — write only there, and leave every existing formula untouched.

Recalculate (mandatory whenever the file contains formulas)

openpyxl writes formulas as strings with no cached values. Until you recalculate, every formula cell reads back as None to anything reading cached values — pandas, load_workbook(data_only=True), and most previewers.

python scripts/recalc.py output.xlsx [timeout_seconds]   # default 30

LibreOffice computes every formula, the file is rewritten in place, and you get JSON: status (success | errors_found), total_formulas, total_errors, and an error_summary naming up to 100 cells per error type (locations_truncated says how many it withheld — trust total_errors, not the length of the list). Fix what it names and run it again. JSON with an error key instead of a status means nothing was recalculated, and only that case exits non-zero — errors_found exits 0, so never treat a clean exit as a clean workbook.

A green recalc proves your formulas evaluate, not that they are right. An off-by-one range or a reference to the wrong row yields a clean, error-free file with wrong numbers. Write 2–3 formulas first and check they pull the values you expect, before building out a grid.

A workbook that links to another file loses those links if you re-save it with openpyxl and then recalculate. Such a formula reads ='[1]Returns Analysis'!$B$2 — the [1] is an index into the workbook's external-reference list, naming a separate file on disk, not a sheet. That file is rarely present here, so the cell's cached value is the only thing holding its data. openpyxl strips that value on save; LibreOffice then has to resolve the reference for real, fails, writes #NAME?, and deletes every link. recalc.py refuses to run in that state — copy those cells' values out of the original before you save over them (--force overrides, and accepts the loss).

Choosing formulas that survive verification

LibreOffice implements fewer functions than Excel, and one it cannot evaluate becomes a literal #NAME? baked into the file you deliver.

  • Prefer Excel-2007-era functions — SUMIFS, INDEX, MATCH, IFERROR, SUMPRODUCT — which need no prefix.
  • Six post-2007 functions work, but only with an _xlfn. prefix, because openpyxl writes your formula into the XML verbatim and Excel stores post-2007 names prefixed (its UI hides the prefix): _xlfn.TEXTJOIN, _xlfn.CONCAT, _xlfn.IFS, _xlfn.SWITCH, _xlfn.MAXIFS, _xlfn.MINIFS. Written bare, each yields #NAME?.
  • Never use XLOOKUP, XMATCH, SORT, FILTER, UNIQUE, or SEQUENCE. The runtime's LibreOffice cannot evaluate them under any prefix. Newer builds do evaluate them, but they are spilling array functions and an openpyxl-written file has no spill metadata, so only the top-left cell of the range gets a value — and recalc.py reports total_errors: 0 on the truncated result. Use INDEX/MATCH for lookups, and sort, filter, and de-duplicate in Python before writing the cells.
  • A formula LibreOffice could not parse is written back lowercased — a quick tell beside a #NAME?.

openpyxl gotchas

  • Reading a model takes two loads. data_only=True yields cached values with the formulas gone; the default yields formula strings with no values. One pass cannot give you both.
  • data_only=True is destructive if you save. That workbook has no formulas left, so saving replaces every one with a literal — permanently.
  • data_only=True on a file openpyxl just wrote returns None everywhere — run recalc.py first. (A formula whose result is "" also reads back as None.)
  • Merged cells: write the top-left anchor only. Every other cell in the range is a MergedCell whose .value is read-only.
  • .xlsm loses its macros unless you pass keep_vba=True to load_workbook.
  • A sheet name containing a space must be quoted in a cross-sheet reference: ='Assumptions Inputs'!$B$5. Unquoted, it evaluates to #VALUE!.

Financial models

Unless the user says otherwise, or the existing file already does something else.

Color: blue text (0,0,255) for hardcoded inputs and scenario levers · black for formulas · green (0,128,0) for links to another sheet · red (255,0,0) for links to another file · yellow fill (255,255,0) for key assumptions and cells the user should fill in.

Numbers: currency $#,##0, with the unit named in the header (Revenue ($mm)) · zeros render as -, including in percentages ($#,##0;($#,##0);-) · negatives in parentheses · percentages 0.0%, stored as fractions (0.15 renders 15.0%; storing 15 renders 1500.0%) · valuation multiples 0.0x · years as text ("2024", never 2,024).

Structure: every assumption in its own labeled cell, referenced by the formulas that use it (=B5*(1+$B$6), never =B5*1.05) · formulas consistent across every projection period, since a lone edited cell mid-row is the commonest silent error · guard denominators that can be zero.

Dependencies

openpyxl, pandas, markitdown (pip, preinstalled — install only if an import fails or the command is missing) · LibreOffice (soffice, auto-configured for sandboxed environments via scripts/office/soffice.py)

모든 파일

53개 파일

xlsx 설치

스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.

ZIP 다운로드

저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.

git clone https://github.com/anthropics/skills/tree/main/skills/xlsx # Copy the skill folder to .claude/skills/ or .codex/skills/

복사 복사
빠른 설정: skill 폴더를 .claude/skills/로 복사하면 Claude가 해당 스킬을 자동으로 감지하여 사용합니다.
저장소 anthropics/skills

관련 스킬

agentwallet
업데이트 된 시간 2026년 7월 7일
brightdata-cli
업데이트 된 시간 2026년 6월 29일
humanize
업데이트 된 시간 2026년 7월 7일
korean-stock-search
업데이트 된 시간 2026년 7월 8일
OR