Introduction
WK1 is the worksheet format of Lotus 1-2-3 Release 2, the spreadsheet that dominated
MS-DOS business computing in the 1980s. Release 1A used the earlier .wks,
and later releases moved to .wk3 and .wk4, which hold several
sheets. IBM, which bought Lotus in 1995, ended the product in 2013. WK1 files still turn
up in old archives, and other spreadsheets can import them.
Structure
A WK1 file is a sequence of records,
each a 2-byte opcode, a 2-byte length and the data, little-endian. The first record is BOF (opcode 0x0000) holding the
file version, 0x0406 for WK1 (.wks files have
0x0404), and the last is EOF (opcode 0x0001). In between come
records for the sheet’s range, column widths and settings, then one record per
cell: integers,
floating-point numbers, labels and formulas, each with a format byte, the column and
row, and the value. Formulas are stored compiled, in reverse Polish order. Lotus
published the record layouts of 1-2-3 Release 1A and Symphony in 1984; the records
Release 2 added are not publicly documented.
Not described
Known, not yet covered
- Reference: the Symphony record layouts (WINDOW, QUERY, PRINT, GRAPH2 and others): the WSFF2 text gives them, but the pages only list the records.
- Reference: the later Lotus formats WK3, WK4 and 123 (WSFF3 and its successors), which are separate formats.
- Viewer: no viewer for
.wk1files yet.
Unknown
- Reference: everything Release 2 of 1-2-3 added to WK1: records above 0x4A, function codes above 0x61 and any marking of relative references in formula cells. No public source was found; it would have to be worked out from real Release 2 files.
Links
Software
- LibreOffice Calc – free office suite’s spreadsheet, which imports Lotus worksheets (Windows, macOS, Linux)
Reference
- Worksheet File Format – Lotus’s 1984 description of the 1-2-3 and Symphony records and formula codes, as kept by SheetJS