我正在使用exceljs 3.8.2。在documentation中,有一种用于条件格式设置的方法addConditionalFormatting。但是安装之后,这个方法就找不到了。
我正在使用下面的代码。
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'}}},
}
]
})发布于 2020-04-28 20:17:36
它存在,但可能已从3.8.0中的index.d.ts文件中丢失。该问题已在3.9.0中修复。请更新依赖项以解决它。
https://stackoverflow.com/questions/60991625
复制相似问题