XLS - MS Excel format
Driver short name
XLS
Build dependencies
libfreexl
This driver reads spreadsheets in the (old) Microsoft Excel binary format. This format pre-dates Excel Open XML Spreadsheet, introduced in Microsoft Excel 2007, and supported by the XLSX driver.
GDAL/OGR must be built against the FreeXL library (GPL/LPL/MPL licensed), and the driver has the same restrictions as the FreeXL library itself as far as which and how Excel files are supported, in particular formulas are not supported.
Each sheet is presented as a OGR layer. No geometry support is available directly (but you may use the OGR VRT capabilities for that).
Configuration options
Configuration options can be specified in command-line tools using the syntax --config <NAME>=<VALUE> or using functions such as CPLSetConfigOption() (C) or gdal.config_options (Python).
The following configuration options are available:
OGR_XLS_HEADERS=[FORCE/DISABLE/AUTO]: Defaults to
AUTO. By default, the driver will read the first lines of each sheet to detect if the first line might be the name of columns. If set to FORCE, the driver will consider the first line will be taken as the header line. If set to DISABLE, it will be considered as the first feature. Otherwise auto-detection will occur.OGR_XLS_FIELD_TYPES=[STRING/AUTO]: Defaults to
AUTO. By default, the driver will try to detect the data type of fields. If set to STRING, all fields will be of String type.