News in versions: FastGrid 1.0, TreeGrid 17.0
FastGrid FastSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Development
services
References References Contacts
TreeGrid Gantt chart SpreadSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Contacts
FastGrid documentation
Search in documentation
FastGrid versions compatibility

Changes log (txt file) Compare FastGrid 1.0 & TreeGrid 17.1

Using in JavaScript frameworks

Angular Ember Express React Svelte Vue Other frameworks NodeJS server SalesForce LWC

Data and creating FastGrid

Simple examples of creating FastGrid Create FastGrid Display grid Access grid by API Sheets, more grids switched in one place Layout and configuration Data rows, columns, toolbars, images Changes in data rows, columns, toolbars Saving changes to server Mark changes Loading children on expand parent Short format

Layout - grid parts

Parts - ColParts and RowParts Part size Part scroll position Sets Column sets Row sets

Toolbars

Toolbar Cells Icon Height Width Toolbar position Dragging and manipulating cells Special toolbars

Rows and columns
Default rows, columns, cells, toolbars
Row and column identity

Row / column id Row / column index Row / column name

Row and column manipulation

API to get grid objects Auto added columns & rows on scroll Blocks of rows / columns Adding / copying / moving Deleting Showing and hiding Layout menu Selecting rows and columns Fill cell values by dragging Locking grid against changes Undo & redo

Row and column tree

Row and column tree Row tree Column tree Expand & collapse

Cells
Cell values and attributes

Read and write any values by API Cell value Cell attributes Cell value & attributes in UTF8 Store

Editing cells

Editing During editing Validation and errors

Cell images

Row cell side icons Icons definition Mark icons and charts Mark icons list Row cell floating images

Cell size

Row height Column width Resizing rows and columns Padding Margin Cell span

Cell style

Grid style and look Cell style permissions Cell style Cell outer border Cell inner border Alternate row & column background

Other cell features

Cell hyperlink Cell tooltip Static cells Other cell attributes Row & column attributes to speed up

Cell types and formats
Cell type and format Range - more values / ranges in cell String type Html type Auto type
Bool type

Bool type Check side icon Bool type & Check side icon

Number type

Format Localization

Date type

Format Localization Calendar

Calculations - formulas
JavaScript formulas

JavaScript formulas Aggregate functions String aggregate functions Other functions

Editable formulas

Formula rules Formula attributes Defined names for editable formulas Conditional functions Lookup functions Cell reference functions Logical functions Informational functions Mathematical functions Trigonometry functions Rounding numbers Number conversions String functions Date functions Summary functions

Dialogs and menus

Dialog Dialog Place Dialog API Menu definition in Script Cell menu List Suggest

Features
Sorting rows / columns

Sorting Sorting settings Comparing strings

Grouping rows / columns

Grouping Grouping settings Comparing strings Pivot grid

Filtering rows and columns

Filtering Filter settings Comparing strings

Search in cells Import files to grid
Export files

Export files Export and copy to clipboard CSV data

Copy & paste via system clipboard

Copy & paste Copy to clipboard Paste from clipboard

Printing

Print Print to PDF

Global grid settings
Grid size & scroll

Grid size Grid scrollbars Paging and view Media rules - responsive design

Saving settings in storage or cookies
Focus and hover cells

Focus cell and cell ranges Mouse hover cells Highlight cells, rows and columns

Events

Mouse events Key events API events

Language

Translation Languages

Messages

Message Message style

Other API

API for iterating rows and columns Paint and repaint Various API methods

Debug & files

Debugging FastGrid files

UTF8 Store - fast & short data
Introduction - License & download

Basic description Main advantages Basic usage License Download Documentation

Script language implementations

JavaScript C# JAVA PHP

Suggested ucodes

Bits - small integers or enums Integers or enums with strings Date and time Floating point numbers Special strings

Basic ucodes

Integer 1 char String 1 char Date 1 char Bits 1 char Integer 2 chars String 2 chars Date 2 chars Float 2 chars Integer 3 chars String 3 chars Date 3 chars Integer and double float 5 chars String 5 chars Date 5 chars Fixed length string Separated strings Adjacent strings Prefix for escaping string Fixed length data Unused custom codes Prefix for stored separator or length Prefix for stored base number Unused basic ucodes

Complex ucodes

chars signed decimals multiple limits varstrings escape base chars2 signed2 decimals2 multiple2 limits2

Internal coding Profiling times for ucode options Function reference

Export files

FastGrid documentation

Cfg string

ExportFormat

["xlsx"] GetCfgAttr SetCfgAttr
Export data format. It can be "xlsx" (MS Excel workbook with multiple sheets), "csv" (comma and linefeed separated plain text without styles), "html" (MS Excel compatible HTML).
Cfg string

ExportFormats

["xlsx,html,csv"] GetCfgAttr SetCfgAttr
List of available formats for export menu. It can contain list (comma separated string or array) of formats possible for ExportFormat.
Cfg string

ExportName

GetCfgAttr SetCfgAttr
File name under the grid will be exported. By default it is the Book id or "$ExportName".
Cfg int

Exporting

[6] GetCfgAttr SetCfgAttr
Which rows and columns are exported to xlsx / html / csv.
0 - none - exports nothing,
1 - focused cell(s) - exports focused cells only,
2 - selected rows / columns or focused cell(s) - exports selected rows and chosen rows with selected columns and chosen columns. If no columns selected, exports selected rows and chosen rows with all columns except not chosen columns. If no rows selected, exports selected columns with all rows except not chosen rows. If no selection, exports focused cells.
3 - selected rows / columns or focused row(s) - like 2, but if no selection, exports focused rows with all columns except not chosen columns. If row selection is restricted and column selection is permitted, exports focused columns with all rows except not chosen rows.
4 - focused cells or selected rows / columns or focused cell - exports focused cells if permitted focusing rectangle by Focus>=2, otherwise like 2.
5 - focused cells or selected rows / columns or focused row(s) - exports focused cells if permitted focusing rectangle by Focus>=2, otherwise like 3.
6 - all rows and columns - exports all rows and all columns except those not chosen in export menu.
Cfg string[]

ExportRows

[""] GetCfgAttr SetCfgAttr
Comma separated list or array of row ids that will be exported as chosen rows according to Exporting.
If the item starts by "-", it is marked as not chosen and is not exported as not chosen rows according to Exporting.
If there is item named "-", it represents all applicable rows as not chosen. If there is item named "*", it represents all applicable rows as chosen. For example "*,-Row3" chooses all rows except Row3.
Cfg string[]

ExportCols

[""] GetCfgAttr SetCfgAttr
Comma separated list or array of column ids that will be exported as chosen columns according to Exporting.
If the item starts by "-", it is marked as not chosen and is not exported as not chosen columns according to Exporting.
If there is item named "-", it represents all applicable columns as not chosen. If there is item named "*", it represents all applicable columns as chosen. For example "*,-Col1" chooses all columns except Col1.
Cfg flags

ExportRowsType

[""] / ["Collapsed,Hidden,Filtered"] GetCfgAttr SetCfgAttr
Which rows are exported:
NoExport - exports also rows with NoExport = 1.
Collapsed - exports also collapsed children.
Hidden - exports also manually hidden rows.
Filtered - exports also filtered rows.
Deleted - exports also deleted rows.
Parents - exports also all parents of exported rows, if exporting only selected rows.
Children - exports also all children of exported rows, if exporting only selected rows.
Block - exports also other rows in Block.
Cfg flags

ExportColsType

[""] / ["Collapsed,Hidden,Filtered"] GetCfgAttr SetCfgAttr
Which columns are exported:
NoExport - exports also columns with NoExport = 1.
Collapsed - exports also collapsed children.
Hidden - exports also manually hidden columns.
Filtered - exports also filtered columns.
Deleted - exports also deleted columns.
Parents - exports also all parents of exported columns, if exporting only selected columns.
Children - exports also all children of exported columns, if exporting only selected columns.
Block - exports also other columns in Block.
Cfg string / int

ExportColSet

[-1] GetCfgAttr SetCfgAttr
Controls exporting multiple column sets to xlsx, their column span.
0 - columns are exported standalone, every column in every set is exported to single column.
-1 - calculates the destination columns to correctly accomodate all set columns, so all the columns are exported with their exact widths.
-2 - chooses the base set as the set with the highest count of columns and spans the columns in other sets as close to destination columns as possible.
-3 - chooses the base set as the set with the highest count of columns, but exports all set columns one by one without span.
If set to column set id or index, this column set is exported as base, one exported column per one destination column, and the other column set columns are spanned as close to destination columns as possible.
If set to number >= 10, it specifies width of destination columns (e.g. 64 for base MS Excel width) and all exported set columns are spanned as close as possible to the destination columns.
It is set to -1, if exporting column margin is set by ExportSizes = ColMargin.
It is set to -3, if exporting column widths is not permitted by ExportSizes = Width.
Cfg int

ExportXlsx

[1] GetCfgAttr SetCfgAttr
If and how the cell values are copied to HTML format (ExportFormat = "html") - html format with values and styles.
Values can contain html code if set ExportStyles flag Html.
0 - no,
1 - raw values with Format attribute,
2 - values in editable format,
3 - values in display format,
4 - empty values,
5 - empty values with Format attribute.
Cfg int

ExportHtml

[3] GetCfgAttr SetCfgAttr
If and how the cell values are copied to HTML format (ExportFormat = "html") - html format with values and styles.
Values can contain html code if set ExportStyles flag Html.
0 - no,
1 - raw values with Format attribute in mso-number-format Excel CSS attribute and in fg-format FastGrid CSS attribute,
2 - values in editable format,
3 - values in display format,
4 - empty values,
5 - empty values with Format attribute in mso-number-format Excel CSS attribute and in fg-format FastGrid CSS attribute.
Cfg int

ExportCsv

[2] GetCfgAttr SetCfgAttr
If and how the cell values are exported to CSV format (ExportFormat = "csv") - text format with values. Values are always copied without html code.
0 - no,
1 - raw values,
2 - values in editable format,
3 - values in display format.
! Cfg flags

ExportStyles

["*"] / ["*,-Calculated,-State,-Bool"] GetCfgAttr SetCfgAttr
If and how the cell styles are exported to xlsx or html. It can contain these keywords:
Align, VertAlign, Wrap, Indent, Rotate, NoEdit, Link, Border, Color, Pattern, TextColor, TextStyle, TextLine, TextSize, TextFont - if set, exports given cell attributes. If set with keyword RowAttr / ColAttr exports also the attributes set in row and column.
Formula - exports cell editable formulas.
Tip - exports Tip attribute to xlsx as comment or to html as title.
Link - exports Link attribute to xlsx as Excel hyperlink or to html as <a>.
State - exports state background colors.
Html - exports cell html.
RowAttr - exports also row and default row attributes according to other keywords.
ColAttr - exports also column and default column attributes according to other keywords.
CellAttr - exports to xlsx the row and column attributes also to the whole rows and columns, not only to cells.
Calculated - exports also calculated cell attributes from default cells.
ColorBorder - sets default cell border for cells with background color, if set keywords Border and Color.
DefaultBorder - exports cell default border, in xlsx it shows the grid lines, in html it adds border to all cells without border.
Bool - exports Bool type as BoolTexts also for ExportXlsx = 1, ExportHtml = 1 and ExportCsv = 1.
Tree - exports tree to xlsx outline.
! Cfg flags

ExportSizes

["Width,Height,RowSpan,ColSpan"] / ["Width,Height,RowSpan,ColSpan,Spanned"] GetCfgAttr SetCfgAttr
If and how the row heights and column widths and their span and margins are exported:
Height - exports row heights.
Width - exports column widths.
RowSpan - exports row span. It can remarkably slow down opening the xlsx in Excel!
ColSpan - exports column span. It can remarkably slow down opening the xlsx in Excel!
Spanned - if exports row or column span to xlsx, it exports also hidden spanned cells with their attributes.
RowMargin - exports row margin.Ignored if not set Height.
ColMargin - exports column margin. If set, sets ExportColSet = -1. Ignored if not set Width.
RestMargin - exports row rest margin.
HideRows - hides the rest of rows in sheet.
HideCols - hides the rest of columns in sheet.
AddCol - if set with HideCols, adds one next column with 1px width to show the last borders.
CalcHeight - for Height it exports actual row heights, calculated according to the content.
Cfg string[]

ExportMenu

[...] / [...] GetCfgAttr SetCfgAttr
Comma separated string or array of items shown in Export menu. Set it to "" to not show the menu. It can contain "-" item as separator. Case sensitive. It can contain these keywords:

Styles (changes ExportStyles attribute):
Color (text and background color), Align (horizontal align), TextStyle (text style and font), VertAlign (vertical align), Border (cell border), AllStyle (Color + Align + TextStyle + VertAlign + Border),
Edit (editing permissions), Link (cell hyperlinks), Formula (editable formulas, but ignored by MS Excel), CellHtml (HTML code in cell value),
State (state colors for added or changed rows and cells), DefBorder (ColorBorder + DefaultBorder; default grid border), Tree (tree symbols to xlsx), Comment (cell Tip attribute),

Rows and columns: (changes ExportRowsType and / or ExporColsType:
Collapsed (children of collapsed parents), Hidden (manually hidden), Filtered (hidden by filter), AllHidden (Collapsed + Hidden + Filtered, all hidden by any reason),
Deleted (deleted, but not removed), Children (also all children), Parent (also all parents),
NoExport (also rows and columns with NoExport = 1, in book it means row and column indexes, only for ExportFormat = "html"),
CollapsedRows, HiddenRows, FilteredRows, AllHiddenRows, DeletedRows, ChildRows, ParentRows, NoExportRows (control only ExportRows),
CollapsedCols, HiddenCols, FilteredCols, AllHiddenCols, DeletedCols, ChildCols, ParentCols, NoExportCols (control only ExportCols).

Sizes and span (changes ExportSizes attribute):
Height (row heights), Width (column widths), Size (Height + Width, row heights and column widths),
RowSpan (cell row span), ColSpan (cell column span), Span (RowSpan + ColSpan, cell row and column span),
RowMargin (space between rows), ColMargin (space between columns), Margin (RowMargin + ColMargin, all space between cells), MarginRest (space after last column if exporting more column sets with different width),
HideRowsOut (hides all remaining rows in xlsx), HideColsOut (hides all remaining columns in xlsx), HideOut (HideRowsOut + HideColsOut, hides all remaining rows and columns in xlsx).

Other options:
File (changes ExportName attribute, inputs text for exported file name),
Format (changes ExportFormat attribute, chooses items from popup list, the items are defined in ExportFormats attribute),
Items (changes Exporting attribute, chooses items from popup list),
Html (changes ExportXlsx or ExportHtml or ExportCsv attributes depending on chosen ExportFormat, chooses items from popup list),
Layout (changes ExportRows and ExportCols attributes, chooses items from popup submenu).
Separator (changes CsvValueSeparator attribute, chooses items from popup list, the items are defined in CsvValueSeparators attribute),
Sheets (changes NoExport attribute of all sheets in book, chooses items from popup list),
StyleExport (changes StyleExport attribute, as grid style used for export instead of actual style)

To hide disabled items in the menu set: Dialogs:{ Export:{ Script:{ HideDisabled:1 } } }. To show the menu in two columns set: Dialogs:{ Export:{ Script:{ Columns:2 } } }.
Cfg any

ExportGrids

[1] GetCfgAttr SetCfgAttr
Only when exporting to xlsx.
If set to 0, it exports only this sheet.
If set to 1, it exports all sheets together according to their NoExport attribute.
If set to string as comma separated list of grid ids, exports these grids together, regardless on their NoExport attribute.
Cfg bool

ExportLoadChildren

[0] GetCfgAttr SetCfgAttr
If set, loads all children of rows with Children attribute on export, if ExportRowsType contains "Collapsed".
Cfg int

NoExport

[0] GetCfgAttr SetCfgAttr
If the grid export is restricted. Only for ExportGrids = 1.
-2 - grid is exported always and not shown in sheets in Export menu, -1 - grid is exported always, 0 - grid is exported only if it is not Hidden, 1 - grid is not exported, 2 - grid is not exported and not shown in sheets in Export menu.
Row, Col int

NoExport

[0/2] GetAttr SetAttr
If exporting the row / column data to xlsx is restricted. -1 exported always either if hidden and hidden are not exported, 0 exported, 1 not exported, 2, not exported either if set ExportRowsType flag NoExport / ExportColsType flag NoExport.
Row, Col int

ExportHidden

[0] GetAttr SetAttr
If the row or column is exported hidden: 0 according to its actual visibility, 1 - always hidden, 2 - always visible.
Part bool

ExportFixed

GetPartAttr SetPartAttr
If set and exports to xlsx, exports this part rows or columns to the frozen top / left panes.
Part int

ExportAutoIgnore

GetPartAttr SetCfgAttr
If set, used instead of AutoRemove to get rows / columns for export when the part adds rows / columns automatically by Auto.
Cfg int

ExportFocused

[0] / [3] GetCfgAttr SetCfgAttr
If and what focused cells are expored in xlsx. 0 - none, 1 - only focused cell, 2 - also focused rect, 3 - also other selected rects.
Cfg int

ExportScroll

[0] / [2] GetCfgAttr SetCfgAttr
If the actual scroll position will be exported. 0 - no, 1 - scrolls to focused cell, 2 - actual scroll.
Cfg bool

ExportZoom

[1/0] GetCfgAttr SetCfgAttr
If the actual Zoom value will be exported. By default is 0 on Mobile (where Zoom is preset) and 1 on all others.
Cfg string[]

ExportDL

GetCfgAttr SetCfgAttr
Comma separated list or array of row D ids. If set, only rows with these default will export their outline level. All other rows will export outline level by 1 higher than their nearest parent with exported level.
Cfg int

ExportBorderTheme

[null / 2] GetCfgAttr SetCfgAttr
If set, exports all empty borders in given xlsx theme color (0 - 56).
Use for some xlsx readers that show empty border as black instead of empty.
By default set to 2 on tablets.
Cfg bool

ExportImages

[0] GetCfgAttr SetCfgAttr
If floating Images are exported.
Cfg any

ExportIcons

[0] GetCfgAttr SetCfgAttr
If or which side icons will be exported. 0 - none, &1 - all left icons, &2 - all right icons, &4 - all text icons.
&8 - indents cell text to not overlay the icons. Only on the aligned side.
&16 - reads also cell attribute ExportIcons.
Or specify comma separated string of icon names to print only them, e.g. ExportIcons="List,Date".
Cell bits

ExportIcons

GetAttr SetAttr
If set and set also ExportIcons&16, it is used instead of ExportIcons
Cfg bits

ExportMarks

[0] GetCfgAttr SetCfgAttr
If or which marks will be exported. 0 - none, &1 - marks on icons layer, &2 - marks on foreground layer, &4 - marks on background layer.
&8 -indents cell text to not overlay the icons. Only on the aligned side.
&16 - reads also cell attribute ExportMarks.
&32 - exports backgrounds layer marks with ExportMarksOpacity opacity for empty cells, &64 - exports transparent marks for &32 also for cells with value.
Cell bits

ExportMarks

GetAttr SetAttr
If set and set also ExportMarks&16, it is used instead of ExportMarks
Cfg number

ExportMarksOpacity

[0.5] GetCfgAttr SetCfgAttr
Opacity for the ExportMarks &32.
Cfg int

ExportMergeImages

[0] GetCfgAttr SetCfgAttr
If set, joins all images with the same align in the same column for given number rows. It will produce high images, but reduces count images in xlsx when exporting many rows.
For example if set to 1000, every 1000 rows will have maximally to 3 images per column together.
Col int

ExportMergeImages

GetAttr SetAttr
Sets ExportMergeImages individually for given column.
Cfg int

ExportMergeImagesTree

[0] GetCfgAttr SetCfgAttr
If set, merges the images by ExportMergeImages only between rows on the same tree level and given lower levels. For example value 2 merges on the same and one lower level.
It can be set to array or comma separated string of two numbers, the second number permits also higher tree levels.
Cfg bool

ExportSvgToPng

[0] GetCfgAttr SetCfgAttr
If set, saves to xlsx the svg images also as png images. For compatibility with Excel 2016 and older. Can remarkably slow down the export, if there are many images.
Cfg int

MaxExportTime

[2000] GetCfgAttr SetCfgAttr
If exporting to xlsx is taking more than this time in milliseconds, progress message is shown during exporting.
If set to 0, the export is always synchronous and cannot be cancelled during long process.
Cfg int

MaxExportSpan

[1000000] GetCfgAttr SetCfgAttr
If amount of exported spanned cells by ExportSizes flags ColSpan and RowSpan reaches this limit, warning message is shown (all the cells are exported anyway).
MS Excel has a problem with opening xlsx with many spanned cells and can be very slow in such case.
Cfg string[]

ExportTipSettings

["10,5,200,70,0,infoBackground"] GetCfgAttr SetCfgAttr
Settings for exported comments in xlsx, comma separated attributes "left,top,width,height,show,background,border".
left, top is position of the comment relative to the right top edge of the cell, cannot be negative.
width, height is size of the comment window.
show is 0 to hide the comments on start, 1 to show all comments on start.
background is background color of the comment window, can be any HTML color.
border is border color of the comment window, can be any HTML color or 'none'.
Cfg int

ExportFontSize

[11] GetCfgAttr SetCfgAttr
Default font size in exported xlsx file. It is in points.
Cfg string

ExportFontFace

["Calibri"] GetCfgAttr SetCfgAttr
Default font name in exported xlsx file.
Cfg int

ExportCompression

[3] GetCfgAttr SetCfgAttr
Zip compression level for xlsx export. Possible values 0 - 9.
0 - no compression, very fast, 5x - 10x faster than compression, but produces really big xlsx files, 5x - 10x bigger than compressed.
1 - the fastest compression, still produces reasonable file size, about 25% bigger and 2x faster than option 6.
3 - reasonable compression, about 10% bigger and 1.7x faster than option 6.
6 - good compression.
9 - maximal compression, about 3% smaller and 1.2x slower than option 6.
Tool string

D

=

"Export"

Default toolbar cell to show Export icon to export chosen content to xlsx / html / csv and to show export options defined by ExportMenu.
Actions

Export

(int target = 0) OnClickExport
Exports the grid data to xlsx / csv / html according to the actual export settings and saves them to file.
API event bool

OnExport

(Grid grid, bool test)
Called before export started. Use it to preset export attributes. Return true to suppress the action.
If set test, it is called just to test if export is possible, return true to restrict the action.
API event bool

OnExported

(Grid grid, any data)
Called after exported data are created, before saved to file. data can be Uint8Array as binary or string as text.
Return Uint8Array or string as new data to save. Return true to suppress the action.

Export and copy to clipboard

Attributes and methods used for export and copy to clipboard.
!! Row bits / object

FE

[0] GetAttr
Fast export. Speeds up exporting to xlsx and html and copying to clipboard as html. It also controls some exporting behavior.
If set to row, it can be set also as object with attributes as column ids or column defaults, e.g. FE: { Col1:31, Col2:0, DefCol1:27 }.
1. bit&1exports cell attributes.
2. bit&2exports cell attributes set in row and column.
3. bit&4normalizes exported html code.
4. bit&8exports Link.
5. bit&16exports Tip.
6. bit&32exports row span.
7. bit&64exports column span.
8, 9. bit&384default is 0; if ignored column span (by ~FE&64 or ExportSizes without ColSpan) exports the value aligned as center continuous if:
0 - is aligned left or center, 128 - also if aligned right, 256 - also if it is not spanned, but other cells are spanned due ExportSizes ColSpan, 384 - never. Does not work for row spanned cells.
10. bit&512default is 0; if set, adds ExportStringPrefix before the value when exporting as csv/text or as xlsx/html without format. To copy dates or numbers as strings.
For ExportXlsx / ExportHtml / ExportCsv / CopyText / CopyHtml = 2 is used only for Date types, for 3 is used for all types.
11. bit&1024default is 0; exports the value either if exporting without values.
12. bit&2048default is 0; adds all cell text style attributes to exported html code.
Cell string

ExportValue

GetAttr SetAttr
Cell value exported, searched or copied to clipboard instead of original cell value. Ignored if set FV without &16.
Cell string

ExportFormat

GetAttr SetAttr
Excel cell format exported or copied to clipboard instead of Format. Not used for formatting value.
Cfg string

ExportDateFormat

["d"] GetCfgAttr SetCfgAttr
Default date format used when exporting / copying to xlsx/html cell with Type="Date" and without Format.
Cfg string

ExportStringPrefix

["\u200B"] GetCfgAttr SetCfgAttr
String added before exported/copied value for FE&512 when exporting/copying without format.
Grid method any

GetExport

(string format = "xlsx", function func = null)
If not set func, returns the grid exported data according to the format and appropriate Export... / Copy... settings.
format = "xlsx" - returns Uint8Array as xlsx file binary data, "html" - returns string as html data in xhtml format, "csv" - returns string as csv data in plain text, "copy" - returns array of two strings as [text,html] for copying to clipboard.
For error returns null.

If set func, runs asynchronously and after finish calls func(any data, bool was_async, int error, bool spanerror), where
data are the exported data according to the format, the same as returned data if called without func,
was_async is set if the function was asynchronous and displayed progress message,
error is 0 for correct full export or >0 as real source rows exported if reached xlsx limit 1,048,576 (for xlsx) or -1 if not all rows were exported due memory limit (fox xlsx), -2 if html export is too long for clipboard and only text is produced (for copy),
spanerror is set if exceeded MaxExportSpan / MaxCopySpan and the data should not (but can) be used.
Return true for success start and null for error.
Grid method string[]

ParseExportItems

(any items, bool cols, string attr, int max, bool obj)
Support method for export. Parses items to array or object.
items are rows / columns for export or copy, e.g. ExportRows, ... It can be comma separated string or array of the row / column ids.
cols is 1 if items contains column ids, 0 if it contains rows.
max is maximal number in row / column attribute ItemX, like Layout dialog MaxItem.
If set obj, returns object of the items by ids like object[id] = 0/1, 1 - chosen, 0 - not chosen.
If not set obj, returns array of the item ids, the not chosen ids start by "-".
This method especially replaces special items "*" and "-" by all the applicable row / column ids.

CSV data

Settings for load, save, import and export data in CSV (comma separated values) format.
The CSV format is loaded if set Format="csv" or Format is not set and Url ends by ".csv".
The CSV format is imported if the file name ends by ".csv".
The CSV format is saved if set Format="csv".
The CSV format is exported if set ExportFormat="csv".
Cfg char / int

CsvValueSeparator

[1] GetCfgAttr SetCfgAttr
Separator for separating cell values in csv data.
For input: if not set or is set to number, it is chosen according to the input data from ",", ";" and "\t". If the separator is know, set it to avoid separator searching and speed the load.
For ouput: if not set or is set to 1 it is ",", for 2 it is ";", for 3 it is "\t".
Cfg string

CsvValueSeparators

[",;\t"] GetCfgAttr SetCfgAttr
String or array of characters that can be chosen as CsvValueSeparator in Export menu.
Cfg char / int

CsvRowSeparator

[1] GetCfgAttr SetCfgAttr
Separator for separating row values in csv data.
For input: if not set or it is set to number, it separates rows by any of CRLF, CR or LF.
For output: if not set or is set to 1 it is "\r\n", for 2 it is "\n", for 3 it is "\r".
Cfg char

CsvQuote

["\""] GetCfgAttr SetCfgAttr
Quote character used in csv data.
Cfg string

CsvBody

["DefRowPart"] GetCfgAttr SetCfgAttr
Row part id where the csv data will be added.
It can be set to "DefRowPart" to use DefRowPart.
Cfg string

CsvCols

["DefColPart"] GetCfgAttr SetCfgAttr
If set to column part id, it creates required columns for added csv data. By default it does not add the columns.
It can be set to "DefColPart" to use DefColPart.
Cfg bool

CsvAddBOM

[1] GetCfgAttr SetCfgAttr
If set, adds "\uFEFF" to beginning of exported CSV file.