# File Formats

Gnumeric supports numerous file formats in addition to its own XML based format. The table below lists the formats currently supported. In the table below, the name of the format is a link which can be used to jump to the section which discusses the format.

Table 14-1The file formats supported by Gnumeric
Format Extension Open Save Import Export MIME type
Gnumeric .gnumeric / .gnm / .xml YES YES application/x-gnumeric
Comma/Tab/Semicolon Separated Values .csv/.tsv YES YES text/plain
Data Interchange Format .dif YES YES
GNU Oleo .oleo YES application/x-oleo
HTML .html / .htm YES YES text/html
LaTeX .tex YES text/x-tex
Linear and Integer Program none / .mps YES application/x-mps
Lotus 1-2-3 .wk1 / .wks YES application/vnd.lotus-1-2-3, application/x-123
Microsoft Excel Old Binary Format (versions 2 - 5) .xls / .xlt / .xlw YES application/vnd.ms-excel
Microsoft Excel Binary Format (Excel 95 - 2003) .xls / .xlt / .xlw YES YES application/vnd.ms-excel
Microsoft Excel 2003 SpreadsheetML .xlsx YES application/vnd.ms-excel
Microsoft Office Open SpreadsheetML (MOOX/ECMA376/ISO29500) .xlsx YES YES application/vnd.ms-excel
OpenOffice.Org / StarOffice Old Format .sxc / .stc YES application/vnd.sun.xml.calc
OpenDocument Format (OASIS ODF and ISO/IEC 26300:2006) .ods / .odt / .sxc / .stc YES YES application/vnd.oasis.opendocument.spreadsheet
Paradox Database .px / .db YES YES
Plan Perfect .pln YES application/x-planperfect
Psion 5 Sheet Files .psisheet YES
PostScript .ps / .eps YES application/postscript
PDF .pdf YES application/pdf
Quattro Pro .wb1 / .wb2 / .wb3 YES application/x-quattropro, application/x-quattro-pro
SC/XSpread none / .sc YES application/x-sc
Multiplan (SYLK) .sylk / .slk YES YES application/x-sylk
Text Formats .txt / .text YES YES text/plain
TROFF .me YES application/x-troff
Xbase .dbf YES application/dbase, application/dbf, application/x-dbase, application/x-dbf, application/x-xbase, zz-application/zz-winassoc-dbf
XHTML .xhtml / .html YES application/xhtml+xml

Files in the file formats marked as Save/Open can be opened or saved with the Open, Save, and Save As menu items in the File menu. Files in the file formats marked as Import/Export can be imported or exported with the items on the Import Data and Export Data submenus of the Data menu.

## 14.2.1. Gnumeric XML File Format

The Gnumeric file format is based on the eXtensible Markup Language (XML) and is used as the default file format.

Gnumeric is currently using two different systems to process XML.

The newer system is based on the SAX processing method for XML and is substantially faster than the older method. This code is based in a plugin module. The exporter is currently used by default but the importer is still incomplete.

The older system is part of the core Gnumeric program and is still used to open files in the Gnumeric format.

 Name: The Gnumeric file format Extensions: .gnumeric Compatible Programs: Gnumeric Open / Save: Both
Limitations

This is the default file format and therefore has the best support of all the formats available. Every feature that can be created in the spreadsheet should be savable using this format.

Plugin

The Gnumeric file format is handled using two different code bases. The older version is part of the application itself. The newer version is in a plugin called "EXPERIMENTAL SAX based XML" because the parser is based on SAX.

Format Details

The Gnumeric file format stores the file contents in the eXtensible Markup Language (XML) and compresses the file using the GNU project's gzip compression library.

The Gnumeric file format is designed to be flexible and powerful. The format is easily processed by computers. The format can readily be improved as gnumeric develops without breaking compatibility with older versions. The format is designed to be easily translated into text so that it can be read by humans.

Gnumeric automatically recognizes the version of the file format of any file saved since this format is contained in the file header. The table below is for information purposes only.

Table 14-2Gnumeric XML format versions
XML File Format Version Gnumeric Version
1
2
3 Since 0.52
4 Since 0.57
5 Since 0.58
6 Since 0.62
7 Since 0.66
8 Since 0.71
9 Since 0.73
10 Since 1.03

An outdated PDF document discussing the Gnumeric file format which should provide a useful starting point was developed by the JWorkbook project. The file can be downloaded from http://www.jfree.org/jworkbook/download/gnumeric-xml.pdf.

Further Processing

Direct manipulation of Gnumeric files is possible by transforming the files to text files and then using standard text file tools like document editors. In order to read the contents a Gnumeric file must first be decompressed and can then be opened. In GNU systems, the Gnumeric default file "Book1.gnumeric" can be uncompressed as follows:

zcat Book1.gnumeric > Book1.text

alternatively, the file can be renamed and then uncompressed with the following pair of commands:
cp Book1.gnumeric Book1.text.gz
gunzip Book1.text.gz

both possibilities yield the file "Book1.text" which is an ASCII text file. This file can be opened in any editor, like Vim or Emacs, or pager, like Less.

XML manipulation tools can be used to transform Gnumeric files and access the data they contain, since the file format is XML. The file can be validated by an XML Schema Definition (XSD) . These are available via the Internet at http://git.gnome.org/cgit/gnumeric/plain/gnumeric.xsd.

The Java Language can be used to create, access, or manipulate Gnumeric format files using the JWorkbook project library. See the project's website for details.

The C# language, through the mono implementation can also be used to manipulate Gnumeric format files.

## 14.2.2. Applix File Format

The Applix file format is used by the Applixware group of applications which include a spreadsheet component. The Applixware spreadsheet is made by Vistasource and claims to be a 'real-time', event driven software system.

 Name: The Applix File Format Extensions: .as Compatible Programs: The Applixware Spreadsheet Import / Export: Import only
Limitations

Saving Applixware files has recently been disabled due to lack of developer interest. Instead of directly saving a file in the Applix format, files can be exported to Applixware can be performed using the Excel file format.

Plugin

Supported by the Applix plugin.

Format Details

## 14.2.3. Comma/Tab/Semicolon Separated Value (CSV/TSV) File Formats

The Comma Separated Value (CSV) and Tab Separated Value (TSV) file formats are a common structuring strategy for text format files. In these files, each line in the file represents a row of data and, within each line of the file, the different data fields are separated from one another using a separator character, often a comma, semicolon or tab. Gnumeric handles CSV and TSV files through the text importer and exporter but these formats are given their own definitions in this document because they are considered very common formats.

Gnumeric will automatically open CSV and TSV format files separating each row into columns based on the presence of appropriate separator characters in the file. If the automatic import leads to any errors, these can generally be corrected by using the "Text Import (configurable)" file format instead. Selecting that file format will launch the Text Import druid which allows the user to import CSV and TSV format files while specifying in greater detail the settings of the import configuration parameters. See the section on importing text files or the section on exporting text files for an explanation of how to open or save CSV and TSV files through the Text Import druid.

 Name: Comma/Semicolon/Tab Separated Value, CSV/TSV Extensions: .csv, .tsv, .txt Compatible Programs: Many Import / Export: Both
Limitations

The CSV file format is only useful for the exchange of cell data and cannot be used for sheet objects like graphical plots. This file format cannot save the formatting of cell contents, backgrounds or borders.

Plugin

Supported by the core Gnumeric program.

Format Details

CSV files are simple text files where each row of the text file represents one row in the spreadsheet and where the cells within a row are separated from each other by a comma.

Further Processing

CSV files can be processed using any tool which operates on text files. The CSV format is also common as a format which can be opened by applications.

See the section on Text Formats

## 14.2.4. Data Interchange Format (DIF) File Format

The Data Interchange Format (DIF) file format is a text based format encoded in ASCII with a header, for integrity checking, and a body. The format was originally developed by Software Arts in order to transfer data from VisiCalc, the first spreadsheet.

 Name: Data Interchange Format Extensions: .dif Compatible Programs: Various Import / Export: Both
Limitations

Since the DIF format only supports a single worksheet, Gnumeric only exports the top worksheet in the view used to save the workbook.

Plugin

Supported by the “Data Interchange Format (DIF) module” plug-in.

Format Details

The format is a text file, encoded in ASCII, with a header and body.

Further Processing

The file can be processed as a text file or imported to any program that recognizes the DIF format.

## 14.2.5. GNU Oleo File Format

The GNU Oleo file format is the format used by the GNU Oleo spreadsheet, one of the early free software spreadsheets. The GNU Oleo project has stagnated so this format is only supported to enable the import of old files.

 Name: GNU Oleo Extensions: Unknown Compatible Programs: GNU oleo Import / Export: Open Only
Limitations

Plugin

Supported by the 'GNU Oleo' plugin.

Format Details

## 14.2.6. The HTML File Format

The Hypertext Markup Language (HTML) file format is a text file format with markup in the Hypertext Markup Language. These files are designed to be viewed in a web browser.

Gnumeric can save the cell contents in a worksheet to a text file which consists either of entire, well formed HTML files of version 3.2 or 4.0, or of a file fragment which contains only a <table> structure and must be inserted into an HTML file. Gnumeric can also open files which consist only of simple, well formed HTML <table> structures.

 Names: Hypertext Markup Language (HTML) Extensions: .html, .htm Compatible Programs: Any Web Browser, any text editor Import / Export: Export only, but also can import HTML structures
Limitations

Only the cell contents of a worksheet are saved with sheet object elements, such as graphical plots, ignored.

Plugin

Supported by the 'HTML & TeX' plugin.

Further Processing

All these files can be opened by any text editor. The HTML 3.2 and 4.0 format files can be opened by any web browser such as Mozilla.

Files which are generated as HTML fragments must be placed into an HTML file with a valid pre-amble and closing statements.

## 14.2.7. LaTeX File Format

The LaTeX file format is a text file format with markup in the LaTeX 2ε derivative of the TeX family of languages.

Gnumeric generates LaTeX files to allow the export of tables of numeric values for use in the LaTeX document processing system. LaTeX is a derived format of the TeX system. The files generated by Gnumeric are designed to be used by a LaTeX processor, such as latex or pdflatex, to generate files in viewable formats such as Device Independent (DVI), PostScript (PS) or Portable Document Format (PDF).

The generated files can either be processed directly or can be included in other LaTeX files.

 Name: LaTeX Extensions: .tex Compatible Programs: latex, pdflatex Import / Export: Export only
Limitations

Gnumeric generates a LaTeX longtable structure which contains only the contents of the cells in the worksheet displayed in the view at the time the file was created.

Font coloring is supported. Thin cell borders are translated into single lines and thick cell borders are translated into double lines. Cell background colors are ignored.

Plugin

Supported by the 'HTML & TeX' plugin.

Format Details

The generated file includes extensive documentation in TeX comment fields, to explain how to use and alter the file. Lines in the file which are comments begin and end with double percent symbols (%%). Lines which are designed as user options begin with a single percent symbol (%) which can be deleted to make the LaTeX command on that line take effect.

Further Processing

The LaTeX files generated by Gnumeric can either be processed directly by a LaTeX processor or can be included as tables in other files. The files can be included by reference as explained below or can be pasted into other files at the appropriate location. The file can also be altered to change certain parameters. These alterations are explained as comments within the file itself and are presented below.

The file created by Gnumeric can be run directly through a LaTeX processor without any modifications. For example, if the file were saved as Book1.tex, the following command

pdflatex Book1.tex

generates a PDF file named Book1.pdf. The file can be generated in landscape format and the headers, footers and column widths of the file can be altered in the manner explained below.

The file can also be included within another LaTeX file to provide a single table. This requires, first, ensuring that all the packages which will be needed are included, and second, defining a LaTeX variable which is used as a dummy tag to exclude the preamble used to process the file on its own. The LaTeX file generated by Gnumeric requires using the following lines in the preamble

\usepackage{ucs}
\usepackage{utf8}{inputenc}
\usepackage{color}
\usepackage{array}
\usepackage{longtable}
\usepackage{calc}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{ifthen}

to include each of these packages. Optionally, to include the table in landscape mode, the preamble also needs the line
\usepackage{lscape}

to include the lscape package. Second, the following line
\def\inputGnumericTable{}

must be included to make the LaTeX processor ignore the preamble section of the file generated by Gnumeric. The generated file can be included either by adding, at the appropriate location in the other file, the line
\input{mygnumericfile.tex}

with the text mygnumericfile replaced with the appropriate file name or by pasting the entire file generated by Gnumeric into the other file.

An option is provided in the file allows the table to be presented in landscape mode which allows wider tables to be included. For files which are to be processed independently, the option can be changed in the document class definition

\documentclass[12pt%
%,landscape%
]{report}

by removing the percent symbol (%) in front of ,landscape. For files to be included as tables in other LaTeX files, the preamble must include the lscape package, as was explained above, and the two commands
\def\gnumericTableEnd{\end{landscape}}
\begin{landscape}

must have the leading percent sign removed.

An option is provided to change the widths of the columns of the file generated by Gnumeric. By default, the file attempts to maintain the proportions between the columns in the Gnumeric worksheet, yet scale the resulting table for the width of the paper defined in LaTeX. To change the column widths, look for the section in the LaTeX file with lines that look like

\def\gnumericColA{107pt*\gnumericScale}
\def\gnumericColB{89pt*\gnumericScale}
\def\gnumericColC{98pt*\gnumericScale}
\def\gnumericColD{89pt*\gnumericScale}
\def\gnumericColE{89pt*\gnumericScale}

and that may have as many entries as there were columns in the worksheet. The TeX 'lengths' defined for each column can be changed. For example, change the second column (Column B) to a width of 0.75 inches, we would simply have to modify this code to:
\def\gnumericColA{107pt*\gnumericScale}
\def\gnumericColB{0.75in}
\def\gnumericColC{98pt*\gnumericScale}
\def\gnumericColD{89pt*\gnumericScale}
\def\gnumericColE{89pt*\gnumericScale}

and the resulting file would have a second column 0.75 inches wide.

An option to change the headers and footers of the table is provided as well. The file itself contains comments on how to alter these but the choices will require seeing the documentation of the longtable LaTeX package. See that documentation and the contents of the file generated by Gnumeric for details.

## 14.2.8. Linear and Integer Program Expression (MPS) File Format

The Linear and Integer Program Expression file format is a text file format, encoded as ASCII, which uses fixed columns. The format was developed by International Business Machines Corporation to express linear and integer programs.

 Name: Linear and Integer Program Expression (MPS) Extensions: none / .mps Compatible Programs: Various linear programming applications Import / Export: Import only
Limitations

Plugin

Supported by the 'Linear and integer expression (MPS) format module' plug-in.

Format Details

The Argonne National Laboratory of the United States has a simple introduction to the MPS format on their web site.

The MIPLIB site has more information including a file named mps_format which is a brief introduction to the format and includes the following section:

The following template is a guide for the use of MPS format:

---------------------------------------------------------------------
Field:    1           2          3         4         5         6
Columns:  2-3        5-12      15-22     25-36     40-47     50-61

NAME   problem name

ROWS

type     name

COLUMNS
column       row       value     row      value
name        name                name
RHS
rhs         row       value     row      value
name        name                name
RANGES
range       row       value     row      value
name        name                name
BOUNDS

type     bound       column     value
name        name
ENDATA
---------------------------------------------------------------------

and provides further explanations to the components. The file also suggests as more complete references:
  "Advanced Linear Programming," by Bruce A. Murtagh
"Computer Solutions of Linear Programs," by J.L. Nazareth

which should provide a better explanation.

## 14.2.9. Lotus 1-2-3 File Format

The Lotus 1-2-3 file format is the format used by the Lotus 1-2-3 spreadsheet, which is now part of the office suite called SmartSuite.

 Name: Lotus 1-2-3 Extensions: .wk1,.wks Compatible Programs: Lotus SmartSuite Import / Export: Import only
Limitations

Plugin

Supported by the 'Lotus 123' plugin.

Format Details

Further Processing

Many spreadsheet programs support this format.

## 14.2.10. Microsoft Excel Old Binary File Format

The Microsoft Excel Old Binary file format is a binary file format used by the Excel program in the Office suite between versions 2 and 5. The format is a common format supported to various extents by most spreadsheets although it is incompletely documented. The Gnumeric project has reversed engineered all of the core features of the format.

 Name: Excel Extensions: .xls Compatible Programs: Microsoft Excel, Microsoft Office, and many other spreadsheets Open / Save: Both
Plugin

Supported by the 'MS Excel (tm)' plugin.

Format Details

These are binary file formats.

Further Processing

A number of other programs are able to process files in the Microsoft Excel file format.

## 14.2.11. Microsoft Excel New Binary File Format

The Microsoft Excel New Binary file format is a binary file format used by the Excel program in the Office suite between versions 95 and 2003. The format is a common format supported to various extents by most spreadsheets although it is incompletely documented. The Gnumeric project has reversed engineered all of the core features of the format.

 Name: Excel Extensions: .xls Compatible Programs: Microsoft Excel, Microsoft Office, and many other spreadsheets Open / Save: Both
Plugin

Supported by the 'MS Excel (tm)' plugin.

Format Details

These are binary file formats.

Further Processing

A number of other programs are able to process files in the Microsoft Excel file format.

## 14.2.12. Microsoft Excel 2003 XML File Format

Microsoft Excel 2003 shipped with a file format called SpreadsheetML. This file is XML. It is not very common, but its core features are supported.

 Name: Excel Extensions: .xlsx Compatible Programs: Microsoft Excel, Microsoft Office, and many other spreadsheets Open / Save: Both
Plugin

Supported by the 'MS Excel (tm)' plugin.

Format Details

These are zip files containing SpreadsheetML files and binary files.

Further Processing

This file format is not very widespread and therefore support by 3rd-party applications is limited.

## 14.2.13. Microsoft Excel Office Open XML SpreadsheetML

Microsoft Office 2007 shipped with a new set of file formats, namely the Microsoft Office Open XML SpreadsheetML format. This format is a semi-open standard based around a zipped XML file. Microsoft Office Open XML SpreadsheetML is mostly standardized in ECMA 376 and ISO 29500. This implementation is covered under the Open Specification Promise and therefore does not infringe upon Microsoft patents.

 Name: Excel Extensions: .xls Compatible Programs: Microsoft Excel, Microsoft Office, and many other spreadsheets Open / Save: Both
Limitations

Most core features of the format are supported.

Plugin

Supported by the 'MS Excel (tm)' plugin.

Format Details

These are zip files containing SpreadsheetML files and binary files.

Further Processing

A number of other programs are able to process files in the Microsoft Excel file format.

## 14.2.14. Microsoft Excel XML

The Microsoft Excel file format is a binary file format used by the Excel program in the Office suite. The format is a common format supported to various extents by most spreadsheets although it is incompletely documented. The Gnumeric project has reversed engineered all of the core features of the format.

 Name: Excel Extensions: .xls Compatible Programs: Microsoft Excel, Microsoft Office, and many other spreadsheets Open / Save: Both
Limitations

Most core features of the format are supported.

Gnumeric does not support the very old file formats used by Excel versions prior to Excel 2.0.

Gnumeric can open files from most of the Microsoft Excel file formats and all of the recent file formats. The formats supported are:

• MS Excel 5.0/95.
• MS Excel 97/2000/XP.
• MS Excel 97/2000/XP & 5.0/95.

Plugin

Supported by the 'MS Excel (tm)' plugin.

Format Details

These are binary file formats.

Further Processing

A number of other programs are able to process files in the Microsoft Excel file format.

## 14.2.15. Multiplan SYLK File Format

The Microsoft Multiplan Symbolic Link Interchange (SYLK) file format is a column based format.

Gnumeric can read files in this format.

 Name: Symbolic Link Interchange (SYLK) Extensions: none / .slk Compatible Programs: Multiplan Import / Export: Import only
Limitations

Plugin

Supported by the 'Multiplan (SYLK)' plugin.

Format Details

## 14.2.16. OpenDocument Format (OASIS ODF and ISO/IEC 26300:2006)

The OpenOffice.org XML file format is zip archive including several components all of which are text files, most of these with markup in the eXtensible Markup Language (XML).

Gnumeric reads version 1.0, 1.1 and 1.2 of ODF spreadsheet files and writes version 1.2 files with or without foreign elements. Foreign elements are an extension mechanism defined in ODF and allow features to be saved in ODF files that are not specifically standardized by ODF. Gnumeric plans to continue to support this format in the future.

 Name: Open Document Format, ODF Extensions: .ods Compatible Programs: OpenOffice.org Calc, LibreOffice Calc, KSpread, StarCalc Open / Save: Both
Limitations

Plugin

Supported by the 'Open Document Format' plugin.

Format Details

The file format is a zip archive containing several text and XML elements: a mimetype file giving the mime type, a content.xml file with the contents of the spreadsheet cells, and several other files with meta data, style definitions or information on the settings. The file contents can be extracted with the unzip command line program or with any of a number of graphical interface programs.

The Organization for the Advancement of Structured Information Standards (OASIS) has accepted this file format as the standard "OASIS Open Office XML Format". The published specification for the file format is available from the OASIS Open Office XML Format Technical Committee web page. Other information is available from the OpenOffice.org XML File Format web page, part of the OpenOffice.org project.

Version 1.0 of ODF was adopted as an international standard by ISO/IEC as ISO/IEC 26300:2006.

Further Processing

Files in this format can be imported and modified by many different programs including the OpenOffice.org Calc and LibreOffice Calc spreadsheets or may be modified through XML processing.

## 14.2.17. OpenOffice.org Old File Format

OpenOffice.org originally shipped with a file format that has served as a basis for the new OASIS-standardized file format. This file format is deprecated.

Gnumeric can both open and save files in this format and plans to continue to support this format in the future.

 Name: OpenOffice.org/StarOffice file format Extensions: .sxw Compatible Programs: OpenOffice.org Calc, StarCalc Import / Export: Both
Limitations

Plugin

Supported by the 'Open Document Format' plugin.

Further Processing

This file format is deprecated and is not widely used.

## 14.2.18. Plan Perfect File Format

The Plan Perfect file format is a format used by the PlanPerfect spreadsheet.

 Name: Plan Perfect Extensions: Unknown Compatible Programs: PlanPerfect. Import / Export: Import only
Limitations

Plugin

Supported by the 'Plan Perfect' plug-in.

Format Details

Further Processing

## 14.2.19. PostScript File Format

The PostScript file format is a text format which contains the program code for a postScript interpreter. PostScript is a page description language designed to enable the creation and transfer of printer-ready output.

Gnumeric supports the creation of PostScript files through the printing interface, not through the file save mechanism. See Chapter 15 ― Printing, for details on how to generate a PostScript file.

 Name: PostScript Extensions: .ps Compatible Programs: Many programs can interpret and display PostScript files including: GGV, ghostview (gv), and ghostscript. Import / Export: Export only
Limitations

Plugin

The creation of PostScript files is supported internally by the printing sub-system.

Format Details

The PostScript language was created by Adobe, Inc. The Adobe web site has a non-technical introduction, as well as a technical overview and the actual specifications.

Further Processing

PostScript files can imported into other documents by several programs. For the very advanced, PostScript files can be reprogrammed using a text editor.

## 14.2.20. Portable Document Format (PDF) File Format

The Portable Document Format (PDF) file format is a binary format which contains page description primitives and combines a subset of the Postscript language with some more recent features. The Portable Document Format is a page description language designed to enable the creation and transfer of printer-ready output.

Gnumeric supports the creation of PDF files through the printing interface, not through the file save mechanism. See Chapter 15 ― Printing, for details on how to generate a PDF file.

 Name: Portable Document Format (PDF) Extensions: .pdf Compatible Programs: PDF is supported by a wide variety of programs including gPDF, Xpdf, GGV, ghostview (gv), and ghostscript, Import / Export: Export only
Limitations

Plugin

The creation of PDF files is supported internally by the printing sub-system.

Format Details

The Postscript language was created by Adobe, Inc. The Adobe web site has a non-technical introduction, as well as a technical overview and the actual specifications.

Further Processing

PDF files can imported into other documents by several programs.

## 14.2.21. Quattro Pro File Format

The Quattro Pro file format is the format used by Corel's QuattroPro spreadsheet.

Gnumeric supports opening these files to import their data.

 Name: Quattro Pro Extensions: .wb1 / .wb2 / .wb3 Compatible Programs: Quattro Pro Import / Export: Import only
Limitations

Plugin

Supported by the Quattro Pro plugin.

Format Details

 Name: SC file format Extensions: YES Compatible Programs: SC, Xspread, S spreadsheets. Import / Export: Import only
Limitations

Plugin

Format Details

## 14.2.23. Text File Formats

Files in the text file format are files in which the bytes represent the text characters of a particular character set using a specific system to relate the binary numbers in the file to the text characters of the set. Such systems are called 'encodings' and become an issue when the file includes characters that are not in the standard ASCII set, such as characters in languages other than English. Character encodings are explained in greater detail in Section 14.4.1.1 ― Character Encodings.

Choosing Import Text File... menu item in the Import Data submenu of the Data menu or the Import Other File... menu item in the Import Data submenu of the Data menu and specifying the "Text import (configurable)" or "Text export (configurable)" file formats to open or save files will cause Gnumeric to start the Text Import or Text Export druids. These allow the users to configure in detail the parameters with which existing files will be read into a workbook or existing workbooks will be output to a file.

The Text file format includes a number of different formatting strategies for text files in which data fields are structured in a regular pattern. Most of these formats represent rows of data on different lines of the file using different strategies to separated data values within each row. 'Fixed-width' formats place each data entry in a separate column and therefore limit the size of the data entries. 'Separated' formats use a special character or character sequence to separate entries. For instance, the comma separated value, the tab separated value formats and the space separated value formats use commas, tabs, and spaces respectively to separate the data fields.

Gnumeric can import and export files from and to a wide variety of text file formats when the text importer or the text exporter is configured appropriately. File can be generated with many different encodings. See the section on importing text files or the section on exporting text files for an explanation of how to import or export these formatted text files.

 Name: Text File Format Extensions: .text / .txt / none Compatible Programs: Many programs can read and create formatted text files Import / Export: Both
Limitations

The exporter can only create text files using a separator character and cannot create fixed-width structured files.

Plugin

Supported by the core Gnumeric program.

Format Details

Text file format files are simple text files containing the data for each cell of the worksheet organized in a systematic fashion.

Further Processing

Text format files can be processed using any tool which operates on text files, and many other applications can read or generate one or more of these formats.

## 14.2.24. TROFF File Format

The TROFF file format is a text file format with markup in TROFF.

The TROFF system is a documentation preparation system that can generate many different output files from an input file with standard markup. Gnumeric produces a file that can be used as input to the TROFF system or its GNU project replacement, GROFF.

The support for this format is mostly intended to produce simple tables into a file which can be used in the TROFF system. Since Gnumeric supports full output to Postscript and PDF file formats, those formats should be used to generate graphics for plots and drawing elements.

 Name: TROFF Extensions: .me Compatible Programs: TROFF, GROFF Import / Export: Export only
Limitations

Plugin

Supported by the 'HTML & TeX' plugin.

Format Details

Further Processing

Two examples of the TROFF system will illustrate how to use this file format. Both examples start with a simple worksheet which consists of a simple grid of cells with cell contents, which has been used to create a file called "myfile.me" in the TROFF file format.

A table in PostScript file format can be created starting from the file generated by Gnumeric. The command

groff -me -t -Tps myfile.memyfile.ps

will create a PostScript file of the corresponding table. Note, however, that Gnumeric itself can make a Postscript file of the table directly through the printing system.

A table in PostScript file format can be created starting from the file generated by Gnumeric. The command

groff -me -t -Tascii myfile.memyfile.ascii

creates an ascii (straight text) file. This file will look like:


Sheet 0

+----------+------------------+-------------+------------+---+
|          | Operating System |             |            |   |
+----------+------------------+-------------+------------+---+
|          |       DOS        |    Linux    |    SCO     |   |
+----------+------------------+-------------+------------+---+
|  January | $1000.00 |$900.00     | $500.00 | | +----------+------------------+-------------+------------+---+ | February |$900.00          | $2500.00 |$300.00    |   |
+----------+------------------+-------------+------------+---+
|    March | $800.00 |$4100.00    | $100.00 | | +----------+------------------+-------------+------------+---+ | April |$700.00          | $5700.00 | ($100.00)  |   |
+----------+------------------+-------------+------------+---+
|      May | $600.00 |$7300.00    | ($300.00) | | +----------+------------------+-------------+------------+---+ | June |$500.00          | $8900.00 | ($500.00)  |   |
+----------+------------------+-------------+------------+---+
|     July | $400.00 |$10500.00   | ($700.00) | | +----------+------------------+-------------+------------+---+ | August |$300.00          | $12100.00 | ($900.00)  |   |
+----------+------------------+-------------+------------+---+
|September | $200.00 |$13700.00   | ($1100.00) | | +----------+------------------+-------------+------------+---+ | October |$100.00          | $15300.00 | ($1300.00) |   |
+----------+------------------+-------------+------------+---+
| November | $0.00 |$16900.00   | ($1500.00) | | +----------+------------------+-------------+------------+---+ | December | ($100.00)        | $18500.00 | ($1700.00) |   |
+----------+------------------+-------------+------------+---+
|          |                  |             |            |   |
+----------+------------------+-------------+------------+---+
|  Totals: | $5400.00 |$116400.00  | (\$7200.00) |   |
+----------+------------------+-------------+------------+---+
|          |                  |             |            |   |
+----------+------------------+-------------+------------+---+

1



## 14.2.25. Xbase File Format

The Xbase file format is a file format that includes a series of files of which one is a text file containing the data and the rest are index or other files. The data file consists of a header and then the records themselves.

Gnumeric only opens the data file.

 Name: XBase data file format Extensions: .dbf Compatible Programs: dBase, Clipper, FoxPro, Visual dBase, Visual FoxPro, and numerous other database applications. Import / Export: Import only
Limitations

Plugin

Supported by the 'XBase' plugin.

Format Details

The xBase file format is a generic name for database files saved in the format used by Aston-Tate's (then Borland's) dBase database system. The system became widely popular and has been used extensively by other systems.

See the Xbase File Format Description by Erik Bachmann for more details on the xBase format.

## 14.2.26. XHTML File Format

The XHTML file format is a text file format with markup in the eXtensible Markup Language (XML) using a definition which mimics the Hypertext Markup Language (HTML). These files are designed to be viewed in a web browser.

Gnumeric can save the cell contents from a worksheet to a text file which consists of an XHTML file fragment containing only a <table> structure, designed to be inserted into another XHTML file.

 Name: XHTML Extensions: .xhtml / .html Compatible Programs: Most modern web browsers such as Mozilla and Mozilla-Firefox Import / Export: Both
Limitations

Plugin

Supported by the 'HTML & TeX' plugin.

Format Details

The file is generated, encoded in UTF-8, in the World Wide Web consortium (W3C) XHTML 1.0 Transitional file format.

Further Processing

These XHTML files can be opened by any text editor and can be viewed using any web browser such as Mozilla.