fix: export module in daftar gangguan dialihkan ke posko lain
This commit is contained in:
17
src/report/utils/xlsx.ts
Normal file
17
src/report/utils/xlsx.ts
Normal file
@ -0,0 +1,17 @@
|
||||
export const setHeaderStyle = (
|
||||
worksheet: any,
|
||||
row: number,
|
||||
column: number,
|
||||
value: string,
|
||||
horizontalAlignment: boolean = false
|
||||
) => {
|
||||
const cell = worksheet.getRow(row).getCell(column)
|
||||
|
||||
cell.value = value
|
||||
cell.alignment = { vertical: 'middle' }
|
||||
cell.font = { bold: true }
|
||||
|
||||
if (horizontalAlignment) {
|
||||
cell.alignment.horizontal = 'center'
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user