-
Hi I have range B2;B5:C99;E5:D99 and number format '### ### ### ###' How to add format for cells in range? addConditionalFormatting not work with numFmt |
Beta Was this translation helpful? Give feedback.
Answered by
Siemienik
Apr 21, 2021
Replies: 1 comment 6 replies
-
Hi! ExcelJS has powerfull class named // @ts-ignore
import Range from 'exceljs/lib/doc/range';
const style = {numFmt:'### ### ### ###'};
const range = new Range('B5','C99');
// There is no `forEachAddress` in a index.d.ts
// Issue tracked by: @link {https://github.com/exceljs/exceljs/issues/1681}
// @ts-ignore
range.forEachAddress((address) => {worksheet.getCell(address).style = {...style} }); |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
Siemienik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! ExcelJS has powerfull class named
Range
. For that purpose what you need, this code should work:Source code