Conditional formats
import { ExcelWorkbook } from "@reductoai/xlsx/officejs";
const book = ExcelWorkbook.fromBytes(bytes);
const sheet = book.worksheets.getItem("Sheet1");
const low = sheet.getRange("D2:D20").conditionalFormats.add("CellValue");
low.cellValue.rule = { formula1: "20", operator: "LessThan" };
low.cellValue.format.fill.color = "#F8CBAD";
Data validation
import { ExcelWorkbook } from "@reductoai/xlsx/officejs";
const book = ExcelWorkbook.fromBytes(bytes);
const sheet = book.worksheets.getItem("Sheet1");
sheet.getRange("E2:E20").dataValidation.rule = {
list: { inCellDropDown: true, source: "Open,Closed" },
};