aurochs
Toolkit for parsing, manipulating, and visualizing Office documents (XLSX / DOCX / PPTX).
Inspect files from the CLI, edit programmatically with JSON specs, embed viewers in React apps.
Install
npm install aurochs
CLI
npx aurochs <format> <command> [options]
XLSX (Spreadsheets)
aurochs xlsx info book.xlsx
aurochs xlsx show book.xlsx Sheet1
aurochs xlsx preview book.xlsx
aurochs xlsx formulas book.xlsx
aurochs xlsx names book.xlsx
aurochs xlsx validation book.xlsx
aurochs xlsx build spec.json
DOCX (Word Documents)
aurochs docx info report.docx
aurochs docx extract report.docx
aurochs docx preview report.docx
aurochs docx styles report.docx
aurochs docx numbering report.docx
aurochs docx tables report.docx
aurochs docx build spec.json
aurochs docx patch spec.json
PPTX (Presentations)
aurochs pptx info deck.pptx
aurochs pptx list deck.pptx
aurochs pptx show deck.pptx 1
aurochs pptx extract deck.pptx
aurochs pptx images deck.pptx
aurochs pptx tables deck.pptx
aurochs pptx diff a.pptx b.pptx
aurochs pptx preview deck.pptx
aurochs pptx build spec.json
aurochs pptx patch spec.json
Library API
aurochs/pptx/parser
Open and parse PPTX files.
import { openPresentation } from "aurochs/pptx/parser";
const pres = openPresentation(zipFile);
console.log(pres.count);
console.log(pres.size);
for (const slide of pres.slides()) {
}
Exports:
openPresentation(file, options?) — parse PPTX and return Presentation
- Types:
Presentation, Slide, SlideInfo, PresentationFile, SlideSize
aurochs/pptx/renderer/svg
Render slides to SVG strings.
import { renderSlideToSvg } from "aurochs/pptx/renderer/svg";
const svg = renderSlideToSvg(slide, theme, { width: 960, height: 540 });
Exports:
renderSlideToSvg, renderSlideSvg — slide to SVG
renderGeometryPathData — shape geometry paths
renderFillToStyle, renderLineToStyle — fill/stroke styles
- SVG primitives (
svg, g, rect, path, text, ...)
aurochs/pptx/renderer/ascii
Render slides to ASCII art for terminal display.
import { renderSlideAscii } from "aurochs/pptx/renderer/ascii";
const ascii = renderSlideAscii(slide, { width: 80, height: 24 });
console.log(ascii);
aurochs/pptx/renderer/mermaid
Convert slides to Mermaid diagram syntax.
import { renderSlideMermaid } from "aurochs/pptx/renderer/mermaid";
const mermaid = renderSlideMermaid(slide);
aurochs/pptx/viewer
React components for embedding presentation viewers.
import { PresentationSlideshow } from "aurochs/pptx/viewer";
<PresentationSlideshow
slides={slides}
onSlideChange={(index) => console.log(index)}
/>
Components:
PresentationSlideshow — fullscreen presentation playback
PresentationViewer — viewer with thumbnail navigation
EmbeddableSlide — single slide embed
SlideShareViewer — paginated slide browser
Supports React 18/19. react and react-dom are optional peer dependencies.