0

I am using exceljs 3.8.2. In documentation there is an method addConditionalFormatting for conditional formatting. But after installation this method is not found.

I am using below code.

import { Workbook, Worksheet, Cell, Fill, Row } from 'exceljs';

worksheet.addConditionalFormatting({
      ref: 'A1:E7',
      rules: [
        {
          type: 'expression',
          formulae: ['MOD(ROW()+COLUMN(),2)=0'],
          style: {fill: {type: 'pattern', pattern: 'solid', bgColor: {argb: 'FF00FF00'}}},
        }
      ]
    })
Manoj
  • 4,951
  • 2
  • 30
  • 56

1 Answers1

0

It exists but may has been lost from index.d.ts file in 3.8.0. It was fixed in 3.9.0. Please update the dependency to resolve it.