FormulaEngineer — A Highly Accurate Excel Formula Engine with support for 430+ Excel functions — explore the complete list NEW3.0.1

FormulaEngineer examples

Create, read, and style Excel workbooks in .NET.

Style workbooks as you write them — fonts, fills, borders, number formats, alignment, and layout — using ExcelStyledWriter. Every example below is a complete, runnable snippet.

Group
Example
6 examples in Conditional formatting

Format entire rows from a formula

EnableConditionalFormatting

An expression rule applied across the whole table, using the mixed reference $B2 so every column in a row is formatted based on the value in one of them.

Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;

var stylingOptions =
    new ExcelStylingOptions
    {
        EnableConditionalFormatting = true
    };

var overdueStyle =
    ExcelStyle.Default.With(
        font: ExcelFontStyle.Default.With(color: ExcelColor.FromRgb(156, 0, 6)),
        fill: ExcelFillStyle.Solid(ExcelColor.FromRgb(255, 199, 206)));

using (var writer = new ExcelStyledWriter("formula-expression-overdue-rows.xlsx", null, stylingOptions))
{
    using (var sheet = writer.CreateWorksheet("Tasks"))
    {
        sheet.WriteRow("Task", "Days remaining", "Owner");
        sheet.WriteRow("Import workbook", 2, "Asha");
        sheet.WriteRow("Review formulas", -1, "Rahul");
        sheet.WriteRow("Approve report", 0, "John");
        sheet.WriteRow("Send dashboard", -3, "Mira");

        sheet.AddConditionalFormat(
            "A2:C5",
            ExcelConditionalFormat.Expression(
                "$B2<0",
                overdueStyle));
    }

    writer.Close();
}

Style your own workbooks

Styling is part of the same package — no separate install, no Excel, no COM automation.