Loading...
Loading...
Reads Excel (.xlsx) files and converts to Markdown format. Handles multiple sheets and large tables. Use when needing to read Excel spreadsheets. Requires openpyxl package.
npx skill4agent add childbamboo/claude-code-marketplace-sample xlsx-reader# WSL環境でPythonスクリプトを実行
wsl python3 scripts/read_xlsx.py "/mnt/c/path/to/file.xlsx"wsl pip3 install openpyxlUser: "data.xlsx を読み込んで"
Assistant:
1. Windowsパスを WSL パスに変換
2. wsl python3 scripts/read_xlsx.py を実行
3. 全シートの内容を Markdown テーブルで表示User: "data.xlsx の Sheet1 と Sheet2 だけ読み込んで"
Assistant:
1. スクリプトにシート名を指定して実行
2. 指定したシートのみ Markdown 化User: "data.xlsx の最初の100行だけ読み込んで"
Assistant:
1. max_rows パラメータを指定して実行
2. 各シートの先頭100行のみ抽出wsl python3 scripts/read_xlsx.py# data.xlsx
**Total Sheets:** 3
---
## Sheet: Sheet1
**Dimensions:** 100 rows × 5 columns
| 列1 | 列2 | 列3 | 列4 | 列5 |
| --- | --- | --- | --- | --- |
| データ1 | データ2 | データ3 | データ4 | データ5 |
| ... | ... | ... | ... | ... |
---
## Sheet: Sheet2
**Dimensions:** 50 rows × 3 columns
| A | B | C |
| --- | --- | --- |
| 値1 | 値2 | 値3 |
| ... | ... | ... |
---scripts/read_xlsx.pypython scripts/read_xlsx.py <file_path> [sheet_names] [max_rows]
# 例
python scripts/read_xlsx.py data.xlsx
python scripts/read_xlsx.py data.xlsx 'Sheet1,Sheet2'
python scripts/read_xlsx.py data.xlsx 'Sheet1' 100wsl pip3 install openpyxl# 行数を制限して読み込み
python scripts/read_xlsx.py large_file.xlsx '' 1000C:\Users\.../mnt/c/Users/...D:\Projects\.../mnt/d/Projects/...| ファイル形式 | 推奨スキル | 理由 |
|---|---|---|
| .xlsx (Excel) | xlsx-reader | Excelネイティブ |
| .xls (旧Excel) | pandas経由 | 別ツール必要 |
| .csv | 直接Read | テキストファイル |
| .tsv | 直接Read | テキストファイル |
# Sheet1 のみ
python scripts/read_xlsx.py data.xlsx 'Sheet1'
# 複数シート
python scripts/read_xlsx.py data.xlsx 'Sheet1,Sheet2,Sheet3'# 各シートの先頭100行のみ
python scripts/read_xlsx.py large_file.xlsx '' 100| 機能 | CSV | Excel (.xlsx) |
|---|---|---|
| 複数シート | ❌ | ✅ |
| セル書式 | ❌ | ⚠️(失われる) |
| 数式 | ❌ | ✅(評価後の値) |
| ファイルサイズ | 小 | 大 |
| 読み込み速度 | 速 | やや遅 |