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
10 examples in Tables and notes

Department budget table

EnableTables

A four-column budget table carrying a variance formula per row, using a lighter built-in table style than the default.

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

var stylingOptions =
    new ExcelStylingOptions
    {
        EnableTables = true
    };

using (var writer = new ExcelStyledWriter("department-budget-table.xlsx", null, stylingOptions))
{
    using (var sheet = writer.CreateWorksheet("Budget"))
    {
        sheet.WriteRow("Department", "Budget", "Actual", "Variance");
        sheet.WriteRow("Engineering", 50000m, 47250m, ExcelFormula.From("B2-C2"));
        sheet.WriteRow("Marketing", 25000m, 26890m, ExcelFormula.From("B3-C3"));
        sheet.WriteRow("Operations", 30000m, 29110m, ExcelFormula.From("B4-C4"));

        sheet.AddTable(
            ExcelTable.Create(
                "BudgetTable",
                "A1:D4",
                new[]
                {
                    ExcelTableColumn.Create("Department"),
                    ExcelTableColumn.Create("Budget"),
                    ExcelTableColumn.Create("Actual"),
                    ExcelTableColumn.Create("Variance")
                },
                ExcelTableStyle.Create("TableStyleLight9")));
    }

    writer.Close();
}

Style your own workbooks

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