@nitra/export-excel
v1.1.0
Published
export-excel helper
Downloads
58
Readme
@nitra/export-excel
import { exportFile, date } from 'quasar'
import { exportToExcel } from '@nitra/export-excel'
const columns = [
{
label: '#',
field: 'id',
align: 'center',
width: 10
},
{
label: 'Test',
field: 'created',
align: 'right',
width: 15
}
]
const rows = [
{
id: 1,
created: date.formatDate(new Date(), 'DD.MM.YYYY HH:mm')
},
{
id: 2,
created: date.formatDate(new Date(), 'DD.MM.YYYY HH:mm')
}
]
const buffer = await exportToExcel(columns, rows, 'buffer')
exportFile(`test.xlsx`, buffer, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')