Skip to content

Commit 2d93716

Browse files
committed
feat: create downloadSubjectTableExcel function
1 parent 3272e17 commit 2d93716

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/web/src/utils/excel.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ export function downloadExcel(filename: string, recordsExport: InstrumentRecords
66
utils.book_append_sheet(workbook, utils.json_to_sheet(recordsExport), 'ULTRA_LONG');
77
writeFileXLSX(workbook, filename);
88
}
9+
10+
export function downloadSubjectTableExcel(filename: string, records: { [key: string]: any }[]) {
11+
const workbook = utils.book_new();
12+
utils.book_append_sheet(workbook, utils.json_to_sheet(records), 'ULTRA_LONG');
13+
writeFileXLSX(workbook, filename);
14+
}

0 commit comments

Comments
 (0)