Search

Participate

Format.xml

Contents

Overview

Format.xml is a configuration file per Openbravo installation that allows you configure the format output for numeric values. It's used by the different numeric references in Application Dictionary, but also can be used in manual code. By default Openbravo ships a Format.xml.template that can be copied as it is without any modification.

If you are building Openbravo from sources, the setup-properties binary makes a copy of it for you.

If you don't already have a Format.xml in the WEB-INF directory of your live Openbravo installation and want to experiment with various settings then copy $openbravo_source/config/Format.xml.template to $live_openbravo_installation/WEB-INF/Format.xml, edit it and restart Tomcat. Ultimately, copy $openbravo_source/config/Format.xml.template as Format.xml and "ant compile -Dtab=xx -Dtr=no" because this way the changes will be permament and won't be lost upon the next rebuild.

Export to CSV format

The export to CSV functionality uses the Format.xml information to format the data (specifically, it uses the decimal separator defined for the system for numeric values).

This can be overwritten in case it is needed, by using the following preferences:

CSV Decimal Separator: If this preference is defined, this will be used as the decimal separator for numbers.

CSV Field Separator: If this preference is defined, this will be used as the field separator. Otherwise, a single comma ',' will be used.

CSV Text Encoding: If this preference is set, this will be used as the encoding type of the generated file. The default encoding used is the Windows iso-8859-1, which will work correctly in Windows environments which use Microsoft Excel. Other popular encodings such as UTF-8 can be used in Linux or Mac environments which use other spreadsheets.