cpr.utils.ExportOption

Grid Excel export options

Index

Properties
Name Type Description
applyFormat Boolean Whether to reflect as it appears in the control.
applySuppress Boolean Whether to reflect cell merging by suppress or mergedToIndexExpr when exporting to Excel.
exceptStyle Boolean Whether to exclude cell styles when exporting.
excludeCellIndex Number[] Header cellIndex array to be excluded when exporting.
excludeColIndex Number[] colIndex array to exclude when exporting.
excludeCols Number[]
freezeHeader Boolean Option to fix the header part when exporting Excel.
reduce Boolean Whether to remove unnecessary data.
rowDataHandler (datas: Number | String | { value?: any, style?: {[styleName:string]: String}, rowspan?: Number, colspan?: Number }[], rowIndex: Number)=>Void A handler that can change the style or data for each row when exporting Excel.
rowgroupStyleHandler (cellStyle: cpr.utils.CellStyle, region: cpr.controls.gridpart.VLOC_REGION, cellIndex: Number, columnName: String)=>Void A handler that can change the style or format for each cell when exporting to Excel.
rows Number[] Array of specific row indexes to be exported.
useFormat Boolean Whether to use Excel's format function when exporting to Excel.

Properties

applyFormat
type Boolean
Whether to reflect as it appears in the control. default true.
true : The control will be exported as it appears.
false : Returns the data (dataset) itself, and if the data type is number, the corresponding data type is also applied.
applySuppress
type Boolean
Whether to reflect cell merging by suppress or mergedToIndexExpr when exporting to Excel. default false.
The rows option is not supported when setting applySuppress.
exceptStyle
type Boolean
Whether to exclude cell styles when exporting. default true.
excludeCellIndex
type Number[]
Header cellIndex array to be excluded when exporting.
When excludeCellIndex is set, all cells with visible=false are also included.
excludeColIndex
type Number[]
colIndex array to exclude when exporting.
When excludeColIndex is set, all cells with visible=false are also included.
excludeCols
deprecated2022.11.04. Please use excludeCellIndex.
type Number[]
freezeHeader
type Boolean
Option to fix the header part when exporting Excel. default false.
reduce
type Boolean
Whether to remove unnecessary data. (ex. {}(empty json object)) default false.
Helps reduce the overall size of export data.
rowDataHandler
type (datas: Number | String | { value?: any, style?: {[styleName:string]: String}, rowspan?: Number, colspan?: Number }[], rowIndex: Number)=>Void
A handler that can change the style or data for each row when exporting Excel.
rowgroupStyleHandler
type (cellStyle: cpr.utils.CellStyle, region: cpr.controls.gridpart.VLOC_REGION, cellIndex: Number, columnName: String)=>Void
A handler that can change the style or format for each cell when exporting to Excel.
rows
type Number[]
Array of specific row indexes to be exported.
useFormat
type Boolean
Whether to use Excel's format function when exporting to Excel. default true.
For useFormat=true to be applied, applyFormat must be true.