Lotus 1-2-3 spreadsheet
application/vnd.lotus-1-2-3;version=2
Magic Bytes
Offset: 0
00 00 02 00 06 04 06 00 08 00
The WK1 file format is a binary spreadsheet specification developed by Lotus Development Corporation for use with Lotus 1-2-3 Release 2. It served as the primary method for storing data tables, formulas, and basic cell formatting within the DOS-based computing environment. Although currently considered an obsolete legacy format, WK1 remains relevant for digital preservation efforts, and its structure poses minimal security risk compared to modern macro-enabled spreadsheets.
Validation Code
How to validate .wk1 files in Python
Python
def is_wk1(file_path: str) -> bool:
"""Check if file is a valid WK1 by magic bytes."""
signature = bytes([0x00, 0x00, 0x02, 0x00, 0x06, 0x04, 0x06, 0x00, 0x08, 0x00])
with open(file_path, "rb") as f:
return f.read(10) == signature
How to validate .wk1 files in Node.js
Node.js
function isWK1(buffer: Buffer): boolean {
const signature = Buffer.from([0x00, 0x00, 0x02, 0x00, 0x06, 0x04, 0x06, 0x00, 0x08, 0x00]);
return buffer.subarray(0, 10).equals(signature);
}
Go
func IsWK1(data []byte) bool {
signature := []byte{0x00, 0x00, 0x02, 0x00, 0x06, 0x04, 0x06, 0x00, 0x08, 0x00}
if len(data) < 10 {
return false
}
return bytes.Equal(data[:10], signature)
}
API Endpoint
GET
/api/v1/wk1
curl https://filesignature.org/api/v1/wk1