Class sap.ui.core.util.ExportTypeCSVModule: sap/ui/core/util/ExportTypeCSV

extends ExportType

CSV export type. Can be used for Export.

Please note that there could be an issue with the separator char depending on the user's system language in some programs such as Microsoft Excel. To prevent those issues use the data-import functionality which enables the possibility to explicitly set the separator char that should be used. This way the content will be displayed correctly.

Potential formulas (cell data starts with one of = + - @) will be escaped by prepending a single quote. As the export functionality is intended to be used with actual (user) data there is no reason to allow formulas.

The maximum cell length is limited to 32,760 characters. In case any string exceeds this limit, it will be cut off.


Since: 1.22.0.
Constructor Summary
new sap.ui.core.util.ExportTypeCSV(sId?, mSettings?)Constructor for a new ExportTypeCSV.
Method Summary
sap.ui.core.util.ExportTypeCSV.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.util.ExportTypeCSV with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.util.ExportTypeCSV.getMetadata()Returns a metadata object for class sap.ui.core.util.ExportTypeCSV.
generate()Generates the file content.
getSeparatorChar()Gets current value of property separatorChar.
setSeparatorChar(sSeparatorChar)Setter for property separatorChar.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.core.util.ExportTypeCSV(sId?, mSettings?)
Constructor for a new ExportTypeCSV.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.util.ExportType can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Method Detail
sap.ui.core.util.ExportTypeCSV.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.util.ExportTypeCSV with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.util.ExportType.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.core.util.ExportTypeCSV.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.util.ExportTypeCSV.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
generate(): string
Generates the file content.
Returns:
{string} content
getSeparatorChar(): string
Gets current value of property separatorChar.

Separator char.

Value needs to be exactly one character or empty for default.

Default value is ,.

Returns:
{string} Value of property separatorChar
setSeparatorChar(sSeparatorChar): sap.ui.core.util.ExportTypeCSV
Setter for property separatorChar.

Value needs to be exactly one character or empty for default. Default value is ','.

Parameters:
{string}sSeparatorChar new value for property separatorChar
Returns:
{sap.ui.core.util.ExportTypeCSV}this to allow method chaining