MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / createExcel

Function createExcel

frontend/packages/common/src/hooks/excel.ts:7–13  ·  view source on GitHub ↗
(sheetTitle: string, columns: ExcelJS.Column[], tableData: T[])

Source from the content-addressed store, hash-verified

5
6export const useExcelExport = <T>() => {
7 const createExcel = (sheetTitle: string, columns: ExcelJS.Column[], tableData: T[]) => {
8 const workBook = new ExcelJS.Workbook()
9 const sheet = workBook.addWorksheet(sheetTitle || $t('默认工作表'))
10 sheet.columns = columns
11 sheet.addRows(tableData)
12 return workBook
13 }
14
15 const exportExcel = async (
16 fileTitle: string,

Callers 1

exportExcelFunction · 0.85

Calls 1

$tFunction · 0.90

Tested by

no test coverage detected