All formats

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

Data values
Formulas
Styles
Merged cells
Comments
Column metadata

What TabularJS extracts from SLK files

Convert SLK to JSON in Node.js

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

js
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

json
{
  "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

OptionEffect for SLK
encodingText 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

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?