1.0.0 • Published 1 year ago

xlsx-merge v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Core library: xlsx-js-style

Publish Package (using yarn):

  1. yarn login
  2. yarn build
  3. yarn publish

ExcelExportTSQ Properties:

PropertyRequimentDefaultTypeDescription
datatrue-object[]Data record array to be displayed.
columnstrue-Column[]Columns of table.
fileNametrue-stringExcel file name (.xlsx).
configtrue-ConfigColumn key mapping to excel fields.
childrentrue-JSX.ElementElement receives onClick() event.
onLoadingtrue-function()Callback executed when children element is clicked.
onSuccesstrue-function()Callback executed when data is exported successfully.
onEmptytrue-function()Callback executed when empty data.
onConvertfalseundefinedfunction()Callback converted data before export.
mergedFieldConditionfalseundefinedstringCondition field to merge cell. Ex: orderCode, bookingCode,...

Column

PropertyRequimentDefaultTypeDescription
idtrue-numberUnique Id.
fieldtrue-stringField mapping to data.
titletrue-stringHeader title.
childrenfalseundefinedColumn[]Nested Columns.
typefalsegeneralcurrency | date | generalValues type.
[key: number \| string]--any-

Config

PropertyRequimentDefaultTypeDescription
alignKeytrue-stringColumn key mapping to align. Ex: align, textAlign, excelAlgin,...
mergedKeytrue-stringColumn key mapping to merge. Ex: mergeCell, isMerge,...
fractionKeytrue-stringColumn key mapping to format float number. Ex: fraction, excelFraction,...
widthKeytrue-stringColumn key mapping to width. Ex: width, excelWidth,...
widthRatefalse1numberRatio of width in excel to that in the original column.
widthDefaultfalse80 | 14numberWidth default by unit: wpx: 80, wch: 14.
unitfalsewpxwpx | wchUnit of width.
1.0.0

1 year ago