WQ2
application/x-quattro-pro;version=5
Magic Bytes
Offset: 0
00 00 02 00 21 51
The WQ2 file format is a legacy spreadsheet document structure created by Borland for use with Quattro Pro for DOS version 5.0. It serves as a container for financial data, mathematical formulas, and organizational tables within the historical Quattro Pro productivity suite. Although now largely obsolete due to the dominance of modern office standards, these files are considered safe and remain relevant for archival recovery or data migration projects.
Validation Code
How to validate .wq2 files in Python
Python
def is_wq2(file_path: str) -> bool:
"""Check if file is a valid WQ2 by magic bytes."""
signature = bytes([0x00, 0x00, 0x02, 0x00, 0x21, 0x51])
with open(file_path, "rb") as f:
return f.read(6) == signature
How to validate .wq2 files in Node.js
Node.js
function isWQ2(buffer: Buffer): boolean {
const signature = Buffer.from([0x00, 0x00, 0x02, 0x00, 0x21, 0x51]);
return buffer.subarray(0, 6).equals(signature);
}
Go
func IsWQ2(data []byte) bool {
signature := []byte{0x00, 0x00, 0x02, 0x00, 0x21, 0x51}
if len(data) < 6 {
return false
}
return bytes.Equal(data[:6], signature)
}
API Endpoint
GET
/api/v1/wq2
curl https://filesignature.org/api/v1/wq2