Welcome! This page showcases the features of the Client Excel Module.
Try out the Excel download and upload demos below.
Excel Download Demo
Try various Excel/CSV/TXT download features. Check the code for each example and download the result using the button.
downloadExcel({
sheetsData: { Sheet1: sampleData },
filename: 'basic-sample',
})
downloadExcel({
sheetsData: {
Sheet1: sampleData,
Sheet2: [{ name: 'Tom', age: 40 }],
},
filename: 'multi-sheet-sample',
})
downloadExcel({
sheetsData: { Styled: sampleData },
sheetsCol: {
Styled: [
{
key: 'name',
header: 'Name',
formatter: (v) => v.toUpperCase(),
style: { font: { color: { rgb: 'FF0000' }, bold: true } },
wch: 20,
},
{
key: 'age',
header: 'Age',
formatter: (v) => `${v} years`,
style: { alignment: { horizontal: 'center' } },
wch: 10,
},
],
},
styleOptions: {
headerStyle: { fill: { fgColor: { rgb: 'E0E0E0' } } },
bodyStyle: { font: { sz: 12 } },
},
filename: 'styled-sample',
})
downloadExcel({
sheetsData: { MultiHeader: sampleData },
sheetsCol: {
MultiHeader: [
{ key: 'name', header: 'Name' },
{ key: 'age', header: 'Age' },
],
},
multiHeadersMap: {
MultiHeader: [
['Name (KR)', 'Age (KR)'],
['Name', 'Age'],
],
},
filename: 'multi-header-sample',
})
downloadExcel({
sheetsData: { Sheet1: sampleData },
filename: 'csv-sample',
type: 'csv',
})
downloadExcel({
sheetsData: { Sheet1: sampleData },
filename: 'txt-sample',
type: 'txt',
})
Excel Upload Demo
Upload an Excel file and see the parsed data below. Try different upload options.
Source Code
Upload Options
Option | Type | Description | Default |
---|---|---|---|
sheetName | string | string[] | Name(s) of the sheets to parse | All sheets |
headerRowIndex | number | Row index where the header starts (0-based) | 0 |
headerRowCount | number | Number of header rows (for multi-row header) | 1 |