SLK to JSONSYLK
Symbolic Link format.
Microsoft's line-based spreadsheet format from the Multiplan era, still offered by Excel as "SYLK (Symbolic Link)". TabularJS decodes cell, format and bounds records, including E-parameter formulas.
A SYLK file is plain text with one record per line. ID opens the file, C;Y2;X1;K"Tea" puts a value in row 2, column 1, F records set formats and column widths, P records list number formats, and E ends the file. A formula is written after an E parameter, in R1C1 notation.
Because it is easy to write by hand, SYLK is still produced by older reporting tools and scripts. TabularJS reads it in Node.js and the browser and returns one worksheet.
Feature support
What TabularJS extracts from SLK files
- Values from
Kparameters: unquoted numbers become numbers, quoted text becomes a string. - Formulas from
Eparameters, converted to A1 notation with=(=R[-2]C+R[-1]Cin B4 becomes=B2+B3). The formula is indataand incells['B4'].formula, with=in both. - Styles from
Frecords (bold and italic, borders, alignment, background) as CSS strings inworksheet.style. - Column widths from
F;Wrecords, and number format masks fromPrecords incells[...].mask. - LF, CRLF and CR-only line endings, so files from classic Mac Excel work too.
Convert SLK to JSON in Node.js
import tabularjs from 'tabularjs';
const result = await tabularjs('prices.slk');
const sheet = result.worksheets[0];
console.log(sheet.data);
// [ [ 'Item', 'Price' ], [ 'Tea', 2.5 ], [ 'Coffee', 3 ], [ 'Total', '=B2+B3' ] ]
console.log(sheet.cells.B4); // { formula: '=B2+B3' }Read SLK files in the browser
import tabularjs from 'tabularjs';
const input = document.querySelector('input[type=file]');
input.addEventListener('change', async () => {
const result = await tabularjs(input.files[0]);
console.log(result.worksheets[0].data);
});JSON output
{
"worksheets": [
{
"data": [
["Item", "Price"],
["Tea", 2.5],
["Coffee", 3],
["Total", "=B2+B3"]
],
"columns": [{ "title": "A", "width": 143 }, { "title": "B", "width": 100 }],
"rows": {},
"cells": { "B4": { "formula": "=B2+B3" } },
"style": {},
"mergeCells": {},
"comments": {}
}
]
}Complete output for a small SYLK file with a column width and one formula. A worksheet from SYLK has no worksheetName.
Options
| Option | Effect for SLK |
|---|---|
| encoding | Text encoding of the file. Default: 'utf-8'. Excel writes SYLK in the system codepage, so pass 'windows-1252' (or your locale's codepage) for files from Excel on Windows. |
Limitations
- Formulas are not calculated, and the value saved next to a formula (its
Kparameter) is dropped in favor of the formula text. - One worksheet per file, without a name, because SYLK has no sheets. Comment lines (starting with
;) are skipped.
Frequently asked questions
What is a .slk file?
SYLK (Symbolic Link) is a text spreadsheet format Microsoft introduced for Multiplan in the 1980s. Excel can still open and save it, and some older programs export data as .slk.
Are SYLK formulas converted to normal Excel formulas?
Yes. SYLK stores formulas in R1C1 notation; TabularJS converts them to A1 notation, so =R[-2]C+R[-1]C in cell B4 becomes =B2+B3. They are returned as text, not calculated.
Can a SYLK file have several sheets?
No. The format holds one sheet, so the result always has a single worksheet.
What is the difference between .slk and .sylk?
None for TabularJS. Both extensions are parsed by the same SYLK parser.
Why TabularJS for SYLK?
- No external spreadsheet parser dependencies: faster installs, smaller bundles.
- One API in Node.js and modern browsers.
- Output is shape-compatible withJspreadsheet: render parsed data in a live workbook with one call.