Class: ExportOptions

ExportOptions()

new ExportOptions()

The ExportOptions type defines options to export the control's data into CSV format. The Export() method exports data to CSV format. A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas

Members

(static) columns :null|number|string|Column

The columns field specifies a list of columns to export. Specifies the list of columns to export. The columns can be one of the following:
  • columns {null}, exports all columns of the control
  • columns {number}, indicates a numeric value that defines the index of the column to export
  • columns {string}, specifies a list of index/identifier/key/caption/plain-caption, separated by comma character
  • columns {Column}, specifies the object reference to the column to export
Type:
  • null | number | string | Column
Example
null {null}, exports all columns of the control
 0 {number}, exports the first column only
 "C1,C2" {string}, exports the columns C1 and C2

(static) eof :string

The eof (EndOfField) field specifies the character to separate fields within the row/item/line (has effect only if format field is "CSV")
Type:
  • string
Example
"," {string}, specifies comma charactar as field separator (default)
 "\t" {string}, specifies TAB charactar as field separator

(static) eor :string

The eor (EndOfRow) field specifies the characters the row/item/line ends (has effect only if format field is "CSV")
Type:
  • string
Example
"\r\n" {string}, specifies that the \r\n sequence ends each row/item/line (default)
 ";" {string}, specifies that the ; character ends each row/item/line

(static) format :string

The format field determines the type of data the Export() method returns
Type:
  • string
Example
null {null}, specifies that the Export() method returns an array of [[value]] type
 "CSV" {string}, specifies that the Export() method returns a string in CSV format

(static) items :string

The items field specifies the items to export. The items field can be one of the following value:
  • "all", exports all items, including the hidden or collapsed items
  • "vis", exports only visible items ( child items of a collapsed item, or not-visible items ( item's height is 0 ) are not exported )
  • "sel", exports only selected items
  • "chk", exports only checked items (within the first column of columns field, else column with the index 0)
Type:
  • string
Example
"", exports nothing
 "sel", exports only selected items

(static) rtrim :boolean

The rtrim field includes or excludes undefined values from right of each row/item/line
Type:
  • boolean
Example
false {boolean}, all values are included in the result (generates the same number of fields on each line)
 true {boolean}, undefined values on the right of each row/item/line are excluded (generates different number of fields on different lines)

(static) str :string

The str field specifies the character to quote values (has effect only if format field is "CSV")
Type:
  • string
Example
"\"" {string}, specifies " character to quote any value that contains other " or eof character (default)
 "'" {string}, specifies ' character to quote any value that contains other ' or eof character