Zum Inhalt springen

Data Interchange Format

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 20. Juli 2008 um 19:08 Uhr durch Gfis (Diskussion | Beiträge) (More links, history, references, and details in the format description). Sie kann sich erheblich von der aktuellen Version unterscheiden.

Data Interchange Format (.dif) is a text file format used to import/export single spreadsheets between spreadsheet programs (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.

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 also 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. 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 one of the constants V (value), NA (not available), ERROR, TRUE, FALSE.

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

  • Jeff Walden: File Formats for Popular PC Software. John Wiley & Sons, Inc., 1986. ISBN 0-471-83671-0