8.5.3 Excel Data Source Directives

If the MIME type of the file data source being read is 'application/vnd.ms-excel', the file is treated as an Excel document and the excel definitions can be used to control how the User Agent reads and writes to the Excel document.

Normally the 'excel.convert' directive is used to read the excel sheet and create a CSV or TSV data source which will be sent to the remote host. If the 'excel.convert' directive is not present then the entire excel file is sent with a content type of 'application/vnd.ms-excel'. If the excel sheet is converted to CSV or TSV the 'csv.uri' or 'tsv.uri' entry supplies the URL query string, but the 'excel.convert' entry determines the content type and charset encoding to be used.




Defines the excel sheet to be sent to the host. If no directive exists, then the first excel sheet is used.


Defines the excel sheet to be used when creating an excel document. If no directive exists then "Sheet1" is used.


If the excel.trace directive exists and has the value of *yes, then the excel read result will be written to the trace file excel-trace.txt.


By default, rows that have no data will be filtered out. Set this directive to the value of *no to stop this filtering.


Specifies the decimal scale to be used for general format numeric cells. The default value is 4.


By default the date value is formatted using the pattern yyyy-MM-dd.
Use this directive to specify your own date format pattern.


Defines the data conversion to be applied before the data is sent to the host.
Possible options:

An additional charset attribute controls the encoding of the data application/comma-separated-values; charset=utf-8


If the excel.convert.decimal directive exists and has the value of *yes, then numeric cell values will have the decimal point converted to the default locale decimal symbol.


*none, *both, *leading, *trailing. The default is *both.



For example, these definitions will send the content of order-data as comma separated values to the host:


# excel.sheet.write=Sheet1

# excel.trace=*yes

# excel.filter.empty=*no

# excel.convert.decimal=*yes

excel.convert=text/comma-separated-values; charset=utf-8

# excel.convert=text/tab-separated-values; charset=utf-8