Usage
FileBuilder
API
Method | Description | Type | Parameter | Returns |
---|---|---|---|---|
addSheet | Add a sheet to the Excel file. | function | SheetBuilder | FileBuilder |
download | Download the Excel file you created. | function | - | void |
SheetBuilder
API
Method | Description | Type | Parameter | Returns |
---|---|---|---|---|
appendThead | Adds a header row to the table. | function | (theadArr: string[], option: any) | SheetBuilder |
appendRow | Adds a row to the table. | function | (tRowArr: string|number|boolean|Date[], option: any) | SheetBuilder |
addTBody | Adds a row in array to the table. | function | (tbodyArr: string|number|boolean|Date[][], option: any) | SheetBuilder |
appendCustomRow | Add custom style rows to the table. | function | (row: string|number|boolean|Date[], option: any) | SheetBuilder |
mergeCell | Merge the cells with the starting cell [x0, y0] and the ending cell [x1, y1] as factors. | function | (start: [number, number], end: [number, number]) | SheetBuilder |
getWorkSheet | Returns the sheet you created. | function | - | SheetBuilder |
getSheetName | Returns the name of the sheet you created. | function | - | string |
setColumnWidth | Set the width for a specific column on the sheet. | function | (columnNumber: number, width: number) | SheetBuilder |
CellBuilder
API
Method | Description | Type | Parameter | Returns |
---|---|---|---|---|
setAlignMentVertical | Sets the vertical alignment of cells. | function | center | top | bottom | CellBuilder |
setAlignMentHorizontal | Sets the horizontal alignment of cells. | function | center | left | right | CellBuilder |
setAlignMentWrapText | Allow text wrapping. | function | - | CellBuilder |
setAlignMentTextRotation | 180 is rotated down 180 degrees, 255 is special, aligned vertically | function | 0 to 180, or 255 | CellBuilder |
setBorder | Sets the border style for cells. | function | null | BorderStyleType | CellBuilder |
setBackgroundColor | Sets the background color of the cell. | function | string(ex.#000000) | CellBuilder |
setFontColor | Set the color of the font. | function | string(ex.#000000) | CellBuilder |
setFontSize | Set the font size. | function | number | CellBuilder |
setFontBold | Set the font in bold. | function | - | CellBuilder |
setFontItalic | Set the font to italic. | function | - | CellBuilder |
setFontStrike | Set strikethrough in the font. | function | - | CellBuilder |
setFontUnderline | Underline the font. | function | - | CellBuilder |
build | Build a cell. | function | - | CellBuilder |