xldx delivers exceptional performance for Excel file generation with zero runtime dependencies. Perfect for generating reports, data exports, and spreadsheets in both browsers and node, bun, or deno.
xldx provides a comprehensive set of features for creating Excel files with advanced styling, theming, and pattern-based formatting - all without dependencies.
Apply styles dynamically based on cell data patterns. Create zebra stripes, highlight differences, or color-code values automatically.
createColumn({
key: 'amount',
patterns: {
bgColorPattern: 'zebraBg',
textPattern: 'colorPerDiff'
}
}) Full type definitions for IntelliSense support. Catch errors at compile time with comprehensive type checking.
const xldx = new Xldx(data);
xldx.createSheet(
{ name: 'Report' },
...columns
); Create complex workbooks with multiple sheets. Each sheet can have its own data, columns, and styling configuration.
xldx.createSheets([
{ options: sheet1, columns },
{ options: sheet2, columns }
]); No runtime dependencies means smaller bundle size and fewer security concerns. Clean, minimal implementation.
import { Xldx } from 'xldx/browser';
const xldx = new Xldx(data);
xldx.createSheet(options, ...columns);
// Download directly
await xldx.download('report.xlsx');
// Or get as Blob
const blob = await xldx.toBlob(); import { Xldx } from 'xldx/server';
const xldx = new Xldx(data);
xldx.createSheet(options, ...columns);
// Write to file
await xldx.write('report.xlsx');
// Or get as Buffer
const buffer = await xldx.toBuffer();