Prototype pollution
Parser and conversion paths reject or ignore
__proto__, prototype and
constructor where untrusted input can become an object
key.
Stackline spreadsheet package
A maintained fork for applications that need a practical replacement
path for xlsx while preserving the familiar workbook API.
Install
npm install @stackline/xlsx
Existing apps that must keep
import * as XLSX from 'xlsx' can use npm alias migration.
npm install xlsx@npm:@stackline/xlsx
Usage
import * as XLSX from '@stackline/xlsx';
export function parseWorkbook(file: ArrayBuffer) {
const workbook = XLSX.read(file, { type: 'array' });
const sheetName = workbook.SheetNames[0];
return XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], {
defval: null
});
}
Write
const worksheet = XLSX.utils.json_to_sheet([
{ name: 'Ada', role: 'Engineer' },
{ name: 'Grace', role: 'Reviewer' }
]);
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, 'People');
Security
Parser and conversion paths reject or ignore
__proto__, prototype and
constructor where untrusted input can become an object
key.
The package keeps the upstream regular expression hardening and adds malformed input regression coverage.
Tests cover XLSX, ODS, XLS, XLML, relationships, custom properties and JSON headers with malicious keys.
HTML exports can opt into hyperlink sanitization while existing output remains unchanged by default.
const html = XLSX.utils.sheet_to_html(worksheet, {
sanitizeLinks: true
});
Formats
| Format family | Read | Write | Notes |
|---|---|---|---|
| XLSX / XLSM / XLSB | Yes | Yes | Modern Excel workbook formats |
| XLS | Yes | Yes | Legacy Excel workbook format |
| ODS / FODS | Yes | Yes | OpenDocument spreadsheet formats |
| CSV / TSV / TXT | Yes | Yes | Plaintext tabular data |
| HTML tables | Yes | Yes | Table import and export helpers |
| DBF / SYLK / DIF | Yes | Yes | Legacy interchange formats |
Release
@stackline/[email protected] on npm.npm ci.npm test.npm run build.make dist.npm pack --dry-run.1.0.6 compatibility patch
writeFile, writeFileXLSX and
writeFileAsync preserve their established
any return declarations throughout the 1.x line.
Parsing, writing, module entrypoints and runtime exports are
unchanged from 1.0.5. The file helpers still return
undefined at runtime.
Public declarations now follow the same SemVer policy as runtime APIs, and npm adoption is recorded daily for evidence-based maintenance decisions.
Version 1.0.3 remains published and supported. Download share is
monitored, but is not used by itself to deprecate a release;
new installations should use latest.