DIF DATA FILE FORMAT

 DIF (Data Interchange Format) is a text file that is used to import/export between different spreadsheet programs such as Excel, StarCalc, dBase, and so on.

This type of format is stored with the extension ". dif"


The characteristics of these files are the following:

 

o       string is any string, it is often the filename or another information.

o       columns is the number of columns of a excel spreadsheet by means of name.

o       rows indicates the number of rows of a excel spreadsheet by means of name.

 

                     

                 This header is followed by the cells and records of the spreadsheet with the information.

 

             

             where data-type admits various types: SPECIAL, NUMERIC, and STRING, represented  by -1, 0 and 1 respectively.
 

o       SPECIAL type

                                           

                      where BOT and EOD are strings without quotation marks. BOT represents the start of the table and EOD the end of data section.

 

o       NUMERIC type

                                       

                             where value-indicator indicates the data type stored in data:

-         TRUE:1.

-         FALSE: 0.

-         V: any numerical value.

-         NA: missing value.

-         ERROR: 0.

 

o       STRING type

                                 

             where string is any text characters.

 

One example of a valid DIF file is the following:

 

Month Week Vehicle Quantity
January 1 Auto 105.000
January 1 Truck 1.050
January 1 Bus 1.575
January 1 Truck 2.100
January 1 Motorbike 583

 

The internal format of DIF file generated is the following:

 

TABLE
0,1
”EXCEL”

VECTORS
0,6
””
TUPLES
0,4
””
DATA
0,0
””

-1,0

BOT

1,0

“Month”

1,0

“Wek”

1,0

“Vehicle”

1,0

“Cantity”

-1,0

BOT

1,0

“January”

0,1

V

1,0

 

“Car”

0,105.000

V

-1,0

BOT

1,0

“January”

0,1

V

1,0

“Truck”

0,1.050

V

-1,0

BOT

1,0

“January”

0,1

“Bus”

0,1.575

V

-1,0

BOT

1,0

 

“January”

0,1

“Truck”

0,2.100

V

-1,0

BOT

1,0

“January”

0,1

V

1,0

“Motorbike”

0,583

V

-1,0

EOD