Data Interchange Format

Data Interchange Format

Data Interchange Format (.dif) is a text file format used to import/export single spreadsheets between spreadsheet programs (OpenOffice.org Calc, Excel, Gnumeric, StarCalc, Lotus 1-2-3, FileMaker, dBase, Framework, Multiplan, etc.). It is also known as "Navy DIF". One limitation is that DIF format cannot handle multiple spreadsheets in a single workbook.

Contents

History

DIF was developed by Software Arts, Inc. (the developers of the VisiCalc program) in the early 1980s. The specification was included in many copies of VisiCalc, and published in Byte Magazine. Bob Frankston developed the format, with input from others, including Mitch Kapor, who helped so that it could work with his VisiPlot program. (Mitch later went on to found Lotus and make Lotus 1-2-3 happen.) The specification was copyright 1981.

DIF was a registered trademark of Software Arts Products Corp. (a legal name for Software Arts at the time).

Syntax

DIF stores everything in an ASCII text file to mitigate many cross-platform issues back in the days of its creation. However modern spreadsheet software, e.g. OpenOffice.org Calc and Gnumeric, offer more character encoding to export/import. The file is divided into 2 sections: header and data. Everything in DIF is represented by a 2- or 3-line chunk. Headers get a 3-line chunk; data, 2. Header chunks start with a text identifier that is all caps, only alphabetic characters, and less than 32 letters. The following line must be a pair of numbers, and the third line must be a quoted string. On the other hand, data chunks start with a number pair and the next line is a quoted string or a keyword.

Values

A value occupies two lines, the first a pair of numbers and the second either a string or a keyword. The first number of the pair indicates type:

  • −1 – directive type, the second number is ignored, the following line is one of these keywords:
    • BOT – beginning of tuple (start of row)
    • EOD – end of data
  • 0 – numeric type, value is the second number, the following line is one of these keywords:
    • V – valid
    • NA – not available
    • ERROR – error
    • TRUE – true boolean value
    • FALSE – false boolean value
  • 1 – string type, the second number is ignored, the following line is the string in double quotes

Header chunk

A header chunk is composed of an identifier line followed by the two lines of a value.

  • TABLE - a numeric value follows of the version, the disused second line of the value contains a generator comment
  • VECTORS - the number of columns follows as a numeric value
  • TUPLES - the number of rows follows as a numeric value
  • DATA - after a dummy 0 numeric value, the data for the table follow, each row preceded by a BOT value, the entire table terminated by an EOD value

The numeric values in header chunks use just an empty string instead of the validity keywords.

Discrepancies in implementations

Some implementations (notably those of older Microsoft products) swapped the meaning of VECTORS and TUPLES. Some implementations are insensitive to errors in the dimensions of the table as written in the header and simply use the layout in the DATA section.

Example

For example, assume we have two columns with one column header row and two data rows:

Text Number
hello 1
has a double quote " in text -3

In a .dif file, this would be:

TABLE
0,1
"EXCEL"
VECTORS
0,2
""
TUPLES
0,3
""
DATA
0,0
""
-1,0
BOT
1,0
"Text"
1,0
"Number"
-1,0
BOT
1,0
"hello"
0,1
V
-1,0
BOT
1,0
"has a double quote "" in text"
0,-3
V
-1,0
EOD

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Data Interchange Format —   [engl.], Datenaustauschformat …   Universal-Lexikon

  • data interchange format file — ➔ file1 * * * data interchange format file UK US noun [C] (ABBREVIATION DIF file) ► IT a computer file that contains information from a file in one program and stores it in a way that makes it possible for it to be used by another program …   Financial and business terms

  • LDAP Data Interchange Format — The LDAP Data Interchange Format (LDIF) is a standard plain text data interchange format for representing LDAP (Lightweight Directory Access Protocol) directory content and update requests. LDIF conveys directory content as a set of records, one… …   Wikipedia

  • LDAP Data Interchange Format — LDIF (LDAP Data Interchange Format) est un format standardisé d échange de données, qui permet la représentation des données contenues dans un annuaire LDAP. Il permet également la représentation d opérations sur les données de l annuaire (ajout …   Wikipédia en Français

  • Lightweight Data Interchange Format — LDIF (Abkürzung aus dem Englischen für LDAP Data Interchange Format) ist ein ASCII basierendes Dateiformat zur Darstellung von Informationen aus einem LDAP Verzeichnis. LDAP beschreibt lediglich ein Kommunikationsprotokoll von Verzeichnisdiensten …   Deutsch Wikipedia

  • LDAP Data Interchange Format — LDIF (Abkürzung aus dem Englischen für LDAP Data Interchange Format) ist ein ASCII basierendes Dateiformat zur Darstellung von Informationen aus einem LDAP Verzeichnis. LDAP beschreibt lediglich ein Kommunikationsprotokoll von Verzeichnisdiensten …   Deutsch Wikipedia

  • Radar Data Interchange Format — Das Radar Data Interchange Format (RDIF) ist ein Protokoll zum Austausch von Radardaten. Festgelegt ist der Standard von der Civil Aviation Authority (CAA, britische Luftfahrtbehörde) im Dokument „RDIF CAA Paper 87002 von 1991“. Das Datenformat… …   Deutsch Wikipedia

  • Graphics Interchange Format — Infobox file format name = Graphics Interchange Format caption = A rotating globe in GIF format. The gradient blue areas of this image transition choppily, a common artifact produced when dithering is not employed. extension = .gif mime =… …   Wikipedia

  • Quicken Interchange Format — (QIF) is an open specification for reading and writing financial data to media (i.e. files). A QIF file typically has the following structure:!Type:type identifier string [single character line code] Literal String Data ... ^ [single character… …   Wikipedia

  • Drawing Interchange Format — Das Drawing Interchange File Format (DXF) ist ein von Autodesk spezifiziertes Dateiformat zum CAD Datenaustausch und wurde in das CAD Programm AutoCAD integriert. Das DXF Format wurde neben dem DWG Format geführt, um einen externen… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”