@treeviz/xlsx-to-ged
v1.0.0
Published
Excel .xlsx to GEDCOM .ged converter with configurable column mapping (TypeScript)
Maintainers
Readme
@treeviz/xlsx-to-ged
Part of the @treeviz organization - A collection of tools for genealogy data processing and visualization.
Convert Excel .xlsx spreadsheets into GEDCOM 5.5.1 with configurable column mapping.
Features
- TreeViz simple layout — fixed column order (surname, given name, birth, death, sex, parent row numbers, …) works without manual mapping
- Header guessing — TreeViz export headers and common hu/en aliases
- Relationship linking — parent/spouse row numbers →
FAMC/FAM, optional spouse + marriage onFAM - Browser-safe API —
ArrayBufferin, GEDCOM text out - CLI —
xlsx-to-ged input.xlsx -o output.ged
Installation
npm install @treeviz/xlsx-to-gedDevelopment
npm i
npm run build
npm testRegenerate the committed example spreadsheet:
npm run generate:exampleCLI
# Header guess (default) — same as the app wizard “Fejléc alapján”
npx xlsx-to-ged input.xlsx -o output.ged
# Fixed TreeViz simple column layout (no header row)
npx xlsx-to-ged input.xlsx -o output.ged --simple
# Pick a worksheet by index or name
npx xlsx-to-ged book.xlsx -o output.ged --sheet 1
npx xlsx-to-ged book.xlsx -o output.ged --sheet PeopleDuring development (without building):
npm run dev:xlsx -- examples/simple-family.xlsx -o output.gedLibrary API
import {
xlsxToGed,
inspectXlsx,
DEFAULT_SIMPLE_LAYOUT,
} from "@treeviz/xlsx-to-ged";
const buffer = await file.arrayBuffer();
const inspect = await inspectXlsx(buffer);
const { gedcom, warnings } = await xlsxToGed(buffer); // default simple layout
// or
const { gedcom, warnings } = await xlsxToGed(buffer, inspect.guessed);See the TreeViz monorepo docs/XLSX_TO_GED_PLAN.md for the full column mapping spec.
Example file
examples/simple-family.xlsx — three-person sheet (row no. = data-row index; regenerate with npm run generate:example).
Requirements
- Node.js 20+
- macOS/Linux/Windows
License
MIT
