[File] Magdir for spreadsheet interchange document; *.slk *.sylk

Jörg Jenderek joerg.jen.der.ek at gmx.net
Wed Apr 1 00:23:25 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

some days ago i used SoftMaker Office. The spreadsheet module can
read/read documents with filename extension slk.
When running file command version 5.38 on such documents these
examples are described generic as text.

For comparison reason i also run other file identifying tools.
DROID ( See https://digital-preservation.github.io/droid/ )
describes such documents as "Microsoft Symbolic Link (SYLK) File".
TrID ( See https://mark0.net/soft-trid-e.html ) identifies such
documents as "SYLK - SYmbolic LinK data" .

Information about that file format can be found on file formats
archive team website and on Wikipedia. This is expressed by comment
lines like
 # URL:	https://en.wikipedia.org/wiki/SYmbolic_LinK_%28SYLK%29
 #	http://fileformats.archiveteam.org/wiki/SYLK

According to documentation characteristic at the beginning of
document is string ID;P. That is used as first test line:
 0	string		ID;P
Unfortunately this is still not unique enough. To skip short DROID
pattern x-fmt-106-signature-id-603.slk test for more bytes at the
beginning by line
 >7	ubyte		>0	spreadsheet interchange document
Instead DROID or TrID name i choose name "spreadsheet interchange
document" used by FreeDesktop.org.

My inspected examples have file name extension slk, but according
to documentation also extension sylk can be used. This is expressed
by line
 !:ext	slk/sylk

Variants of the format are supported by Multiplan, Microsoft Excel,
Microsoft Works, OpenOffice.org, Gnumeric and SoftMaker PlanMaker.
After the P at offset 3 often the name of the program that created
the document is stored in short form. For example XL means
Microsoft Excel. So show this information for known programs by
lines like
 >>>4	string		Gnumeric	Gnumeric
 >>>4	string		pmw		PlanMaker
 >>>4	string		CALCOOO32	Libre/OpenOffice Calc
 >>>4	string		SCALC3		StarOffice Calc
 >>>4	string		XL		Excel
 >>>4	string		WXL		Excel
 >>>4	string		MP		Multiplan
 >>>4	default		x
 >>>>4	string		x		%s

The documentation mention mime type "text/spreadsheet", but
Gnumeric and sometimes PlanMaker register a user defined one. That
is expressed by line like
 !:mime	application/x-sylk

After applying the above mentioned modifications by appended sylk.txt
then all inspected SLK examples are now described correctly and i
get an output like:

gnumeric-multiplan.slk:		spreadsheet interchange document,
				created by Gnumeric
libreoffice-sylk.slk:		spreadsheet interchange document,
				created by Libre/OpenOffice Calc
ooo75775-2.slk:			spreadsheet interchange document,
				created by Excel
ooo80484-1.slk:			spreadsheet interchange document,
				created by Excel
OpenOffice-SYLK.slk:		spreadsheet interchange document,
				created by Libre/OpenOffice Calc
planmaker-sylk.slk:		spreadsheet interchange document,
				created by PlanMaker
scalc-sylk.slk:			spreadsheet interchange document,
				created by StarOffice Calc
wikipedia.slk:			spreadsheet interchange document
x-fmt-106-signature-id-603.slk: ASCII text

Because file format is pure text magic lines maybe belong to
Magdir/wordprocessors. Because file format is a spreadsheet the lines
maybe belong to Magdir/database.

I hope my lines for Magdir can be applied in future version of file
utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek


-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXoPe3gAKCRCv8rHJQhrU
1s6MAKDICDIwW9Ko6+UiOB5gSBHkRoXhhQCg0Egmze85T5MucgUGZmGJfdZBSXk=
=cgoO
-----END PGP SIGNATURE-----
-------------- next part --------------

#------------------------------------------------------------------------------

# From:	Joerg Jenderek
# URL:	https://en.wikipedia.org/wiki/SYmbolic_LinK_%28SYLK%29
#	http://fileformats.archiveteam.org/wiki/SYLK
# Note:	called by TrID "SYLK - SYmbolic LinK data",
#	by DROID "Microsoft Symbolic Link (SYLK) File"
#	by FreeDesktop.org "spreadsheet interchange document"
0	string		ID;P
# skip short DROID x-fmt-106-signature-id-603.slk
>7	ubyte		>0		spreadsheet interchange document
# https://reposcope.com/mimetype/text/spreadsheet
#!:mime	text/spreadsheet
# https://reposcope.com/mimetype/application/x-sylk	by Gnumeric
!:mime	application/x-sylk
!:ext	slk/sylk
>>4	ubyte		>037		\b, created by
# Gnumeric, pmw~PlanMaker, CALCOOO32~LibreOffice OpenOffice, SCALC3~StarOffice
# MP~Multiplan, XL~Excel WXL~Excel Windows
>>>4	string		Gnumeric	Gnumeric
>>>4	string		pmw		PlanMaker
>>>4	string		CALCOOO32	Libre/OpenOffice Calc
>>>4	string		SCALC3		StarOffice Calc
>>>4	string		XL		Excel
# Excel, version probably running on Windows
>>>4	string		WXL		Excel
# not tested
>>>4	string		MP		Multiplan
# unknown spreadsheet software
>>>4	default		x
>>>>4	string		x		%s


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sylk.txt.sig
Type: application/octet-stream
Size: 95 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20200401/4c25cd6a/attachment.obj>


More information about the File mailing list