class sap.ui.core.util.ExportTypeCSV

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/core/util/ExportTypeCSV
Application Component: CA-UI5-TBL

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.


Constructor

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#constructor for a general description of the syntax of the settings object.

new sap.ui.core.util.ExportTypeCSV(sId?, mSettings?)
Param Type Default Value Description
sId? string

id for the new control, generated automatically if no id is given

mSettings? object

initial settings for the new control


Properties

Name Type Default Value Description
separatorChar string ,

Separator char.

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

Visibility: public

Borrowed Properties

Name Type Default Value Description
byteOrderMark boolean undefined

Whether to prepend an unicode byte order mark when saving as a file (only applies for utf-8 charset).

Visibility: public
charset string

Charset.

Visibility: public
fileExtension string

File extension.

Visibility: public
mimeType string

MIME type.

Visibility: public

Methods Overview

Method Description
sap.ui.core.util.ExportTypeCSV.extend

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.

generate

Generates the file content.

sap.ui.core.util.ExportTypeCSV.getMetadata

Returns a metadata object for class sap.ui.core.util.ExportTypeCSV.

getSeparatorChar

Gets current value of property separatorChar.

Separator char.

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

Default value is ','.

setSeparatorChar

Setter for property separatorChar.

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

sap.ui.core.util.ExportTypeCSV.extend

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.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

generate

Generates the file content.

sap.ui.core.util.ExportTypeCSV.getMetadata

Returns a metadata object for class sap.ui.core.util.ExportTypeCSV.

getSeparatorChar

Gets current value of property separatorChar.

Separator char.

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

Default value is ','.

setSeparatorChar

Setter for property separatorChar.

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

Param Type DefaultValue Description
sSeparatorChar string

new value for property separatorChar