Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnadeluy committed Dec 18, 2024
1 parent 1bf7f8b commit e4c0514
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/lib/ssb/utils/tableExportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface TableExport {

const sheetName = 'Sheet1'

const createTableWorbook = (tableElement: TableExport['tableElement']) => {
const createTableWorkbook = (tableElement: TableExport['tableElement']) => {
return XLSX.utils.table_to_book(tableElement, {
sheet: sheetName,
raw: true,
Expand All @@ -16,7 +16,7 @@ const createTableWorbook = (tableElement: TableExport['tableElement']) => {

export const exportTableToExcel = ({ tableElement, fileName }: TableExport): void => {
const sheetFileName = fileName ? `${fileName}.xlsx` : 'tabell.xlsx'
const workbook = createTableWorbook(tableElement)
const workbook = createTableWorkbook(tableElement)

const worksheet = workbook.Sheets[sheetName]
Object.keys(worksheet).flatMap((cell) => {
Expand All @@ -37,7 +37,7 @@ export const exportTableToExcel = ({ tableElement, fileName }: TableExport): voi

export const exportTableToCSV = ({ tableElement, fileName }: TableExport): void => {
const sheetFileName = fileName ? `${fileName}.csv` : 'tabell.csv'
const workbook = createTableWorbook(tableElement)
const workbook = createTableWorkbook(tableElement)

XLSX.writeFile(workbook, sheetFileName, { bookType: 'csv', type: 'string' })
}

0 comments on commit e4c0514

Please sign in to comment.