@christophervr/xlsx-core
v0.2.1
Published
Framework-neutral Excel workbook model, parser, formula engine and serializer (thin entry point over ooxml-core/xlsx)
Maintainers
Readme
@christophervr/xlsx-core
The DOM-free document model and file API, re-exported from the canonical OOXML core.
Live demo | npm | Full docs | Source
The framework-neutral Excel workbook model, parser, formula engine and serializer. A thin entry point: @christophervr/xlsx-core re-exports ooxml-core/xlsx and @christophervr/xlsx-core/load re-exports ooxml-core/xlsx/load; the logic lives in ooxml-core.
Install
npm install @christophervr/xlsx-coreQuick start
import { createWorkbook, saveXlsx } from '@christophervr/xlsx-core';
import { loadWorkbook } from '@christophervr/xlsx-core/load';
const workbook = createWorkbook();
const bytes = await saveXlsx(workbook);
const reopened = await loadWorkbook(bytes, { fileName: 'Book1.xlsx' });API and limitations
The main entry handles .xlsx, .xlsm and .xltx. The /load entry also opens legacy Excel 97-2003 .xls files (read only; they save as .xlsx) and .csv text, sniffing the format from the bytes. Saving is not lossless for features the model does not cover; unmodelled parts (VBA, pivot tables, charts) are carried through unchanged where the sheet still exists.
Documentation
License
Apache-2.0.
