Symbolic Link (SYLK)

Last updated
Symbolic Link (SYLK)
Filename extension
.slk
Internet media type application/x-sylk
Developed by Microsoft

Symbolic Link (SYLK) is a Microsoft file format typically used to exchange data between applications, specifically spreadsheets. SYLK files conventionally have a .slk suffix. Composed of only displayable ANSI characters, it can be easily created and processed by other applications, such as databases.

Contents

Microsoft has never published a SYLK specification. Variants of the format are supported by Multiplan, Microsoft Excel, Microsoft Works, OpenOffice.org, LibreOffice [1] and Gnumeric. The format was introduced in the 1980s and has not evolved since 1986. [2]

A commonly encountered (and spurious) 'occurrence' of the SYLK file happens when a comma-separated value (CSV) format is saved with an unquoted first field name of 'ID', that is the first two characters match the first two characters of the SYLK file format. Microsoft Excel (at least to Office 2016) will then emit misleading error messages relating to the format of the file, such as "The file you are trying to open, 'x.csv', is in a different format than specified by the file extension...". [3] [4]

SYLK is known to cause security issues, as it allows an attacker to run arbitrary code, offers the opportunity to disguise the attack vector under the benign-looking appearance of a CSV file, and is still enabled by default on recent (2016) versions of Microsoft Excel. [2]

Limitations

SYLK does not have support for Unicode. Even if a SYLK file is created by an application that supports Unicode (for example Microsoft Excel), the SYLK file will be encoded in the current system's ANSI code page, not in Unicode. If the application contained characters that were displayable in Unicode but have no code point in the current system's code page, they will be converted to question marks ('?') in the SYLK file.

The semicolon is treated as a field separator in SYLK, so cannot be used unescaped in data values. If a character string in the SYLK file is to contain a semicolon (;) then it should be prefixed with another semicolon so the string would appear as e.g., "WIDGET;;AXC1254". MS Excel will strip the first semicolon on import and the data element will appear as "WIDGET;AXC1254".

Each line of a SYLK input file must be no longer than 260 characters. Otherwise, Microsoft Excel will issue an error message and skip loading the overlong line.

Sample SYLK code

As an example, the following SYLK code in a text file with the .slk extension:

ID;P C;Y1;X1;K"Row 1" C;Y2;X1;K"Row 2" C;Y3;X1;K"Total" C;Y1;X2;K11 C;Y2;X2;K22 C;Y3;X2;K33 E

would be displayed like this when read by an appropriate spreadsheet:

Row 111
Row 222
Total33

for numeric formatting

The formatting of 2 decimal digits is applied to Column 2 using

F;P2;C2

where P0 is for General, P1 is for no decimal, P2 is for 2 digits, P3 has leading $ sign with 2 decimal points as defined below.

ID;P P;PGeneral P;P_(* #,##0_);;_(* \-#,##0_);;_(* "-"_);;_(@_) P;P_(* #,##0.00_);;_(* \(#,##0.00\);;_(* "-"??_);;_(@_) P;P_("$"* #,##0.00_);;_("$"* \(#,##0.00\);;_("$"* "-"??_);;_(@_) C;Y1;X1;K"Row 1" C;Y2;X1;K"Row 2" C;Y3;X1;K"Total" C;Y1;X2;K11 C;Y2;X2;K22 C;Y3;X2;K0;ER1C2+R2C2 F;P2;C2 E

would be displayed like this when read by an appropriate spreadsheet:

Row 111.00
Row 222.00
Total33.00

for column width

F;Wn1[S]n2[S]n3 defines the widths of a group of columns:

[S]
one space
n1
the first column
n2
the last column
n3
the width of columns in number of characters

For example: Adding these SYLK codes will adjust the column width of column 1 and 2 to 20 and 30 respectively.

F;W1 1 20 F;W2 2 30 

cell formatting properties

 F;clnc2
cl
one of the following 1-character formatting codes:
D
default
C
continuous cross-cell display
E
scientific exponentiation
F
fixed decimal point
G
general format
$
leading $ and 2 decimal points
*
bar graph, one asterisk per unit (5 would be *****)
n
the number of digits.
c2
one of the following 1-character alignment codes:
D
default
C
center
G
general(textleft, numbersright)
L
left justify
R
right justify

For example: The following SYLK code demonstrates the cell formatting properties:

 ID;P  P;PGeneral  C;Y1;X1;K"Row 1 Left Justify"  F;P0;FG0L  C;Y2;X1;K"Row 2 Right Justify"  F;P0;FG0R  C;Y3;X1;K"Total at Center"  F;P0;FG0C  C;Y1;X2;K11  C;Y2;X2;K22  C;Y3;X2;K0;ER1C2+R2C2  F;Y1;X2;FF2L  F;Y2;X2;FF2R  F;Y3;X2;F$2C  F;W1 2 25  E 

SYLK syntax

SYLK_file ::=  Record +  Record ::=  RecordType Field* newline 

Date and time are stored as a floating point value. The whole number part is a number of days from the Jan 1 1900 (if the O record contains the ;V0 directive, specifying 1900 as the starting point for calculations), the fraction is the number of seconds divided by 86400 (60*60*24, number of seconds in a day). Conversion to unix time can be done by subtracting the difference between Jan 1 1970 and Jan 1 1900 (25,569 days) and then multiplying by 86400; converting from unix time to SYLK datetime is done by dividing the value by 86400 and then adding 25569. The cell style has to be set to some date formatting value, e.g. P;Pdd/mm/yyyy\ hh:mm:ss to be displayed properly.

.slk file exports opened with Excel have a limit of 255 characters in a cell. This limit is not present in LibreOffice.

Syntax for SYLK can be found at:

and at:

Limits related to reading and saving with Excel:

Related Research Articles

<span class="mw-page-title-main">Microsoft Excel</span> Spreadsheet editor, part of Microsoft Office

Microsoft Excel is a spreadsheet editor developed by Microsoft for Windows, macOS, Android, iOS and iPadOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications (VBA). Excel forms part of the Microsoft 365 suite of software.

<span class="mw-page-title-main">Multiplan</span> Spreadsheet program

Multiplan is spreadsheet program developed by Microsoft and introduced in 1982 as a competitor to VisiCalc.

<span class="mw-page-title-main">Spreadsheet</span> Computer application for organization, analysis, and storage of data in tabular form

A spreadsheet is a computer application for computation, organization, analysis and storage of data in tabular form. Spreadsheets were developed as computerized analogs of paper accounting worksheets. The program operates on data entered in cells of a table. Each cell may contain either numeric or text data, or the results of formulas that automatically calculate and display a value based on the contents of other cells. The term spreadsheet may also refer to one such electronic document.

Quattro Pro is a spreadsheet program developed by Borland and now sold by Corel, most often as part of Corel's WordPerfect Office suite.

<span class="mw-page-title-main">GNU TeXmacs</span> Open-source word processor

GNU TeXmacs is a scientific word processor and typesetting component of the GNU Project. It originated as a variant of GNU Emacs with TeX functionalities, though it shares no code with those programs, while using TeX fonts. It is written and maintained by Joris van der Hoeven and a group of developers. The program produces structured documents with a WYSIWYG user interface. New document styles can be created by the user. The editor provides high-quality typesetting algorithms and TeX and other fonts for publishing professional looking documents.

<span class="mw-page-title-main">Table (information)</span> Arrangement of information or data, typically in rows and columns

A table is an arrangement of information or data, typically in rows and columns, or possibly in a more complex structure. Tables are widely used in communication, research, and data analysis. Tables appear in print media, handwritten notes, computer software, architectural ornamentation, traffic signs, and many other places. The precise conventions and terminology for describing tables vary depending on the context. Further, tables differ significantly in variety, structure, flexibility, notation, representation and use. Information or data conveyed in table form is said to be in tabular format. In books and technical articles, tables are typically presented apart from the main text in numbered and captioned floating blocks.

<span class="mw-page-title-main">Comma-separated values</span> File format used to store data

A comma-separated values (CSV) file is a text file that uses a delimiter to separate values. The delimiter is often a comma, giving rise to the name of this file format.

<span class="mw-page-title-main">OLAP cube</span> Multidimensional data array organized for rapid analysis

An OLAP cube is a multi-dimensional array of data. Online analytical processing (OLAP) is a computer-based technique of analyzing data to look for insights. The term cube here refers to a multi-dimensional dataset, which is also sometimes called a hypercube if the number of dimensions is greater than three.

In statistics, a contingency table is a type of table in a matrix format that displays the (multivariate) frequency distribution of the variables. They are heavily used in survey research, business intelligence, engineering, and scientific research. They provide a basic picture of the interrelation between two variables and can help find interactions between them. The term contingency table was first used by Karl Pearson in "On the Theory of Contingency and Its Relation to Association and Normal Correlation", part of the Drapers' Company Research Memoirs Biometric Series I published in 1904.

<span class="mw-page-title-main">NeoOffice</span> macOS office suite

NeoOffice is an office suite for the macOS operating system developed by Planamesa Inc. It is a commercial fork of the free and open source LibreOffice office suite, including a word processor, spreadsheet, presentation program and graphics program, it adds some features not present in the macOS versions of LibreOffice and Apache OpenOffice. Current versions are based on LibreOffice 4.4, which was released mid-2014.

Essbase is a multidimensional database management system (MDBMS) that provides a platform upon which to build analytic applications. Essbase began as a product from Arbor Software, which merged with Hyperion Software in 1998. Oracle Corporation acquired Hyperion Solutions Corporation in 2007. Until late 2005 IBM also marketed an OEM version of Essbase as DB2 OLAP Server.

In computing, Dynamic Data Exchange (DDE) is a technology for interprocess communication used in early versions of Microsoft Windows and OS/2. DDE allows programs to manipulate objects provided by other programs, and respond to user actions affecting those objects. DDE was partially superseded by Object Linking and Embedding (OLE), and is currently maintained in Windows systems only for the sake of backward compatibility.

A pivot table is a table of grouped values that aggregates the individual items of a more extensive table within one or more discrete categories. This summary might include sums, averages, or other statistics, which the pivot table groups together using a chosen aggregation function applied to the grouped values.

This is an overview of software support for the OpenDocument format, an open document file format for saving and exchanging editable office documents.

Data Interchange Format (.dif) is a text file format used to import/export single spreadsheets between spreadsheet programs.

The Microsoft Office XML formats are XML-based document formats introduced in versions of Microsoft Office prior to Office 2007. Microsoft Office XP introduced a new XML format for storing Excel spreadsheets and Office 2003 added an XML-based format for Word documents.

<span class="mw-page-title-main">Numbers (spreadsheet)</span> Spreadsheet application by Apple Inc.

Numbers is a spreadsheet application developed by Apple Inc. as part of the iWork productivity suite alongside Keynote and Pages. Numbers is available for iOS and macOS High Sierra or newer. Numbers 1.0 on OS X was announced on August 7, 2007, making it the newest application in the iWork suite. The iPad version was released on January 27, 2010. The app was later updated to support iPhone and iPod Touch.

<span class="mw-page-title-main">XLeratorDB</span>

XLeratorDB is a suite of database function libraries that enable Microsoft SQL Server to perform a wide range of additional (non-native) business intelligence and ad hoc analytics. The libraries, which are embedded and run centrally on the database, include more than 450 individual functions similar to those found in Microsoft Excel spreadsheets. The individual functions are grouped and sold as six separate libraries based on usage: finance, statistics, math, engineering, unit conversions and strings. WestClinTech, the company that developed XLeratorDB, claims it is "the first commercial function package add-in for Microsoft SQL Server."

<span class="mw-page-title-main">FarPoint Spread</span> Computer software

FarPoint Spread is a suite of Microsoft Excel-compatible spreadsheet components available for .NET, COM, and Microsoft BizTalk Server. Software developers use the components to embed Microsoft Excel-compatible spreadsheet features into their applications, such as importing and exporting Microsoft Excel files, displaying, modifying, analyzing, and visualizing data. Spread components handle spreadsheet data at the cell, row, column, or worksheet level.

<span class="mw-page-title-main">OpenRefine</span> Application for data cleanup and data transformation

OpenRefine is an open-source desktop application for data cleanup and transformation to other formats, an activity commonly known as data wrangling. It is similar to spreadsheet applications, and can handle spreadsheet file formats such as CSV, but it behaves more like a database.

References

  1. "LibreOffice Calc - Supported File Formats". 12 November 2016.
  2. 1 2 Stan Hegt (2019-10-30). "Abusing the SYLK file format". outflank.nl. Retrieved 2019-12-14.
  3. ""SYLK: File format is not valid" error message when you open file" . Retrieved August 18, 2015.
  4. "Excel CSV import returns an SYLK file format error". 9 January 2012. Retrieved August 18, 2015.