WQ1
application/x-quattro-pro;version=1-4
Magic Bytes
Offset: 0
00 00 02 00 20 51
WQ1 is a spreadsheet file format originally developed by Borland and currently owned by Corel as part of the Quattro Pro suite. It was primarily utilized for organizing financial data, performing complex calculations, and generating business charts during the early era of personal computing. Although now considered an obsolete format superseded by modern spreadsheet standards, WQ1 files are generally safe as they lack the executable macro vulnerabilities found in contemporary office document types.
Validation Code
How to validate .wq1 files in Python
Python
def is_wq1(file_path: str) -> bool:
"""Check if file is a valid WQ1 by magic bytes."""
signature = bytes([0x00, 0x00, 0x02, 0x00, 0x20, 0x51])
with open(file_path, "rb") as f:
return f.read(6) == signature
How to validate .wq1 files in Node.js
Node.js
function isWQ1(buffer: Buffer): boolean {
const signature = Buffer.from([0x00, 0x00, 0x02, 0x00, 0x20, 0x51]);
return buffer.subarray(0, 6).equals(signature);
}
Go
func IsWQ1(data []byte) bool {
signature := []byte{0x00, 0x00, 0x02, 0x00, 0x20, 0x51}
if len(data) < 6 {
return false
}
return bytes.Equal(data[:6], signature)
}
API Endpoint
GET
/api/v1/wq1
curl https://filesignature.org/api/v1/wq1