Excel Processor

by ntaksh42

artdata

Process Excel files with data manipulation, formula generation, and chart creation. Use when working with spreadsheets or Excel data.

Skill Details

Repository Files

1 file in this skill directory


name: excel-processor description: Process Excel files with data manipulation, formula generation, and chart creation. Use when working with spreadsheets or Excel data.

Excel Processor Skill

Excelファイルの作成、編集、解析を行うスキルです。

概要

Excelの読み書き、数式、グラフ、スタイル設定を自動化します。

主な機能

  • データ読み書き: セル、行、列の操作
  • 数式: SUM、VLOOKUP等の自動生成
  • グラフ: 折れ線、棒、円グラフ
  • スタイル: 色、フォント、罫線
  • 条件付き書式: ルールベースの書式
  • ピボットテーブル: 集計表作成
  • CSV/JSON変換: データ変換

使用方法

Python (openpyxl)

from openpyxl import Workbook, load_workbook
from openpyxl.styles import Font, PatternFill
from openpyxl.chart import BarChart, Reference

# 新規作成
wb = Workbook()
ws = wb.active
ws.title = "Sales Data"

# データ入力
ws['A1'] = "Product"
ws['B1'] = "Sales"
ws.append(["iPhone", 1000])
ws.append(["MacBook", 800])

# スタイル設定
ws['A1'].font = Font(bold=True)
ws['A1'].fill = PatternFill(start_color="FFFF00", fill_type="solid")

# グラフ作成
chart = BarChart()
data = Reference(ws, min_col=2, min_row=1, max_row=3)
cats = Reference(ws, min_col=1, min_row=2, max_row=3)
chart.add_data(data, titles_from_data=True)
chart.set_categories(cats)
ws.add_chart(chart, "D1")

wb.save("sales.xlsx")

# 読み込み
wb = load_workbook("sales.xlsx")
ws = wb.active
for row in ws.iter_rows(values_only=True):
    print(row)

JavaScript (ExcelJS)

const ExcelJS = require('exceljs');

async function createExcel() {
  const workbook = new ExcelJS.Workbook();
  const worksheet = workbook.addWorksheet('Sales');

  // ヘッダー
  worksheet.columns = [
    { header: 'Product', key: 'product', width: 15 },
    { header: 'Sales', key: 'sales', width: 10 }
  ];

  // データ
  worksheet.addRow({ product: 'iPhone', sales: 1000 });
  worksheet.addRow({ product: 'MacBook', sales: 800 });

  // スタイル
  worksheet.getRow(1).font = { bold: true };
  worksheet.getRow(1).fill = {
    type: 'pattern',
    pattern: 'solid',
    fgColor: { argb: 'FFFFFF00' }
  };

  // 数式
  worksheet.getCell('B4').value = { formula: 'SUM(B2:B3)' };

  await workbook.xlsx.writeFile('sales.xlsx');
}

データ分析 (pandas)

import pandas as pd

# 読み込み
df = pd.read_excel('data.xlsx', sheet_name='Sheet1')

# 分析
summary = df.groupby('Category')['Sales'].sum()

# 書き込み
with pd.ExcelWriter('output.xlsx', engine='openpyxl') as writer:
    df.to_excel(writer, sheet_name='Data', index=False)
    summary.to_excel(writer, sheet_name='Summary')

高度な機能

from openpyxl.utils.dataframe import dataframe_to_rows
from openpyxl.chart import LineChart, Reference

# データフレームから
import pandas as pd
df = pd.DataFrame({
    'Month': ['Jan', 'Feb', 'Mar'],
    'Sales': [100, 150, 120]
})

wb = Workbook()
ws = wb.active
for r in dataframe_to_rows(df, index=False, header=True):
    ws.append(r)

# 条件付き書式
from openpyxl.formatting.rule import ColorScaleRule
ws.conditional_formatting.add('B2:B4',
    ColorScaleRule(start_type='min', start_color='AA0000',
                   end_type='max', end_color='00AA00'))

# 数式
ws['B5'] = '=AVERAGE(B2:B4)'
ws['B6'] = '=MAX(B2:B4)'

wb.save('advanced.xlsx')

ライブラリ

Python

  • openpyxl: .xlsx読み書き
  • xlrd/xlwt: .xls (旧形式)
  • pandas: データ分析
  • xlsxwriter: 高速書き込み

JavaScript

  • ExcelJS: 完全機能
  • xlsx: SheetJS、読み込み特化
  • node-xlsx: シンプル

Go

  • excelize: 高性能

Java

  • Apache POI: 標準ライブラリ

バージョン情報

  • スキルバージョン: 1.0.0
  • 最終更新: 2025-01-22

Related Skills

Xlsx

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

data

Clickhouse Io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

datacli

Clickhouse Io

ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

datacli

Analyzing Financial Statements

This skill calculates key financial ratios and metrics from financial statement data for investment analysis

data

Data Storytelling

Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.

data

Team Composition Analysis

This skill should be used when the user asks to "plan team structure", "determine hiring needs", "design org chart", "calculate compensation", "plan equity allocation", or requests organizational design and headcount planning for a startup.

artdesign

Startup Financial Modeling

This skill should be used when the user asks to "create financial projections", "build a financial model", "forecast revenue", "calculate burn rate", "estimate runway", "model cash flow", or requests 3-5 year financial planning for a startup.

art

Kpi Dashboard Design

Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.

designdata

Dbt Transformation Patterns

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.

testingdocumenttool

Startup Metrics Framework

This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.

art

Skill Information

Category:Creative
Last Updated:11/22/2025