Spreadsheets in ChapterWise

ChapterWise supports interactive spreadsheets as a content type within codex files. This enables budgets, schedules, inventories, and any tabular data to live alongside your narrative content.

Features

  • Read-only display - Clean, non-editable data tables
  • Excel-style formulas - SUM, AVERAGE, IF, and more
  • Multiple data sources - Inline CSV, .xlsx files, external CSV, or YAML config
  • Excel import - Include .xlsx files directly (converted automatically)
  • Width control - Full, half, or third width layouts
  • Dark mode support - Full theme matching including scrollbars and headers
  • Mobile responsive - Horizontal scrolling on small screens

Quick Start

1. Inline CSV (Simplest)

Add a spreadsheet directly in your codex file:

content:
  - key: budget
    name: "Project Budget"
    type: spreadsheet
    width: 1/1
    value: |
      Item,Cost,Quantity,Total
      Camera,5000,2,=B2*C2
      Lens,2000,3,=B3*C3
      Tripod,500,2,=B4*C4

2. External CSV File

Reference an existing CSV:

content:
  - key: inventory
    type: spreadsheet
    width: 1/1
    include: /data/inventory.csv

3. Excel (.xlsx) File

Import directly from Excel:

content:
  - key: budget
    type: spreadsheet
    width: 1/1
    include: /data/budget.xlsx

Formulas in the .xlsx are resolved to their computed values on import.

4. Full Control with .spreadsheet.yaml

For column types, formatting, and advanced features:

content:
  - key: budget
    type: spreadsheet
    width: 1/1
    include: /data/budget.spreadsheet.yaml

Documentation

Guide Description
Format Reference Complete .spreadsheet.yaml specification
Python Generation Create spreadsheets with Polars
AI Generation Prompt Claude to generate spreadsheets
Body Shortcodes Embed spreadsheets inline in body text
Troubleshooting Common issues and solutions

When to Use Spreadsheets

Good for: - Budgets and financial tracking - Schedules and timelines - Inventory lists - Data that needs calculations - Comparative tables

Not ideal for: - Simple key-value pairs (use attributes instead) - Long-form text (use body field) - Deeply nested data (use children hierarchy)