public interface ExportFormatting For server-based exports (e.g. ListGrid.exportData() or DataSource.exportData()):
exportAs is a spreadsheet format (XLS or OOXML), dsField.format or dsField.exportFormat will be used if specified, otherwise, DataSourceField.dateFormatter will be used if specified, otherwise, no formatting will be applied and the date or number will be shown in the spreadsheet program's default formatting. DSRequest.exportRawValues to false, format settings available to server will be used, exactly as explained above for spreadsheet exports with exportData(). ListGrid.exportClientData() or DataSource.exportClientData(): exportAs is a spreadsheet format (XLS or OOXML), rules are the same as for server-driven export, except that if no dsField.format or dsField.exportFormat is specified, dateFormatter settings on client-side UI components will be used if a built-in formatter is used (for example, if ListGridField.dateFormatter is set to the built-in formatter "toEuropeanShortDate"). If you need date or number values to appear exactly as shown to the user, set DSRequest.exportDatesAsFormattedString or DSRequest.exportNumbersAsFormattedString, respectively, but see the docs for these properties for the drawbacks of doing this.exportClientData() rather than exportData() is precisely to create a fully formatted export). If you instead set ListGrid.exportRawValues to true, only standard formats appropriate to data interchange are used, the same as described for exportData() above. ListGrid.exportRawValues. If you only want to override the default behaviors for numeric values, you can use ListGrid.exportRawNumbers (note, the exportRawNumbers setting has no effect if exportRawValues is set to true) Use DSRequest.exportPropertyIdentifier to override the default behavior for a server or client-driven export and force either component field names or titles to be exported.
displayField in the same record, a com.smartgwt.client.types.ValueMap or an optionDataSource. The table below shows what values get exported for each of these possibilities, in combination with the exportValueFields flag and whether you are using client-driven or server-driven export:
| Use case | Exports value field | Exports display field |
| exportClientData(), in-record displayField, exportValueFields=true | ✓ | ✓ |
| exportClientData(), in-record displayField, exportValueFields=false | ✓ | |
| exportClientData(), valueMap declared in DataSource, exportValueFields=true | ✓ | |
| exportClientData(), valueMap declared in DataSource, exportValueFields=false | ✓ | |
| exportClientData(), valueMap defined in code, exportValueFields=true | ✓ | |
| exportClientData(), valueMap defined in code, exportValueFields=false | ✓ | |
| exportClientData(), optionDataSource, exportValueFields=true | ✓ | ✓ |
| exportClientData(), optionDataSource, exportValueFields=false | ✓ | |
| exportData(), in-record displayField (must be declared in DataSource), exportValueFields not specified | ✓ | ✓ |
| exportData(), in-record displayField (must be declared in DataSource), exportValueFields=true | ✓ | |
| exportData(), in-record displayField (must be declared in DataSource), exportValueFields=false | ✓ | |
| exportData(), valueMap declared in DataSource | ✓ | |
| exportData(), valueMap defined in code | ✓ | |
| exportData(), optionDataSource | ✓ |
CubeGrid.getValueFormat(), CubeGrid.getValueExportFormat(), DSRequest.getExportRawValues(), DSRequest.getExportPropertyIdentifier(), DSRequest.getExportDatesAsFormattedString(), DSRequest.getExportNumbersAsFormattedString(), DSRequest.getExportTZ(), FormItem.getExportFormat(), SimpleType.getFormat(), SimpleType.getExportFormat(), DetailViewerField.getFormat(), DetailViewerField.getExportFormat(), ListGridField.getFormat(), ListGridField.getExportFormat()