xlsx-merge
v1.0.0
Published
### Publish Package (using yarn): 1. `yarn login` 2. `yarn build` 3. `yarn publish`
Downloads
3
Readme
Core library: xlsx-js-style
Publish Package (using yarn):
yarn login
yarn build
yarn publish
ExcelExportTSQ Properties:
| Property | Requiment | Default | Type | Description |
| :------- | :-------- | :------ | :----- | ----------- |
| data
| true
| - | object[]
| Data record array to be displayed. |
| columns
| true
| - | Column[]
| Columns of table. |
| fileName
| true
| - | string
| Excel file name (.xlsx)
. |
| config
| true
| - | Config
| Column key mapping to excel fields. |
| children
| true
| - | JSX.Element
| Element receives onClick()
event. |
| onLoading
| true
| - | function()
| Callback executed when children element
is clicked. |
| onSuccess
| true
| - | function()
| Callback executed when data is exported successfully. |
| onEmpty
| true
| - | function()
| Callback executed when empty data. |
| onConvert
| false
| undefined
| function()
| Callback converted data before export. |
| mergedFieldCondition
| false
| undefined
| string
| Condition field to merge cell. Ex: orderCode
, bookingCode
,... |
Column
| Property | Requiment | Default | Type | Description |
| :------- | :-------- | :------ | :----- | ----------- |
| id
| true
| - | number
| Unique Id. |
| field
| true
| - | string
| Field mapping to data. |
| title
| true
| - | string
| Header title. |
| children
| false
| undefined
| Column[]
| Nested Columns. |
| type
| false
| general
| currency
| date
| general
| Values type. |
| [key: number \| string]
| - | - | any
| - |
Config
| Property | Requiment | Default | Type | Description |
| :------- | :-------- | :------ | :----- | ----------- |
| alignKey
| true
| - | string
| Column key mapping to align. Ex: align
, textAlign
, excelAlgin
,... |
| mergedKey
| true
| - | string
| Column key mapping to merge. Ex: mergeCell
, isMerge
,... |
| fractionKey
| true
| - | string
| Column key mapping to format float number. Ex: fraction
, excelFraction
,... |
| widthKey
| true
| - | string
| Column key mapping to width. Ex: width
, excelWidth
,... |
| widthRate
| false
| 1
| number
| Ratio of width in excel to that in the original column. |
| widthDefault
| false
| 80
| 14
| number
| Width default by unit: wpx: 80
, wch: 14
. |
| unit
| false
| wpx
| wpx
| wch
| Unit of width. |