DIF (.dif)
DIF (.dif)
Background & Context

-
- DIF spreadsheet format.
- Standard file format for spreadsheets and other tabular data.
- Used as an exchange format for spreadsheet applications.
- DIF is an acronym for Data Interchange Format.
- Plain text format.
- Stores a single spreadsheet.
- Developed in 1980 as part of the VisiCalc spreadsheet software.
Import & Export

- Import["file.dif"] imports a DIF file, returning a list of lists representing the rows and columns stored in the file.
- Import["file.dif",elem] imports the specified element.
- Import["file.dif",{elem,suba,subb,…}] imports a subelement.
- The import format can be specified with Import["file","DIF"] or Import["file",{"DIF",elem,…}].
- Export["file.dif",expr] creates a DIF file from expr.
- Supported expressions expr include:
-
{v1,v2,…} a single column of data {{v11,v12,…},{v21,v22,…},…} lists of rows of data array an array such as SparseArray, QuantityArray, etc. tseries a TimeSeries, EventSeries or a TemporalData object Dataset[…] a dataset Tabular[…] a tabular object - Export["file.dif",expr] uses the InputForm of non-numeric table elements.
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements

- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Data" two-dimensional array, representing the rows and columns stored in the DIF file "Grid" table data as a Grid object "Tabular" table data as a Tabular object - Import and Export use the "Data" element by default.
History
Introduced in 2007 (6.0) | Updated in 2012 (9.0) ▪ 2025 (14.2) ▪ 2025 (14.3)