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 Layout

Hidden columns for internal data

Hides a column carrying internal reference codes while keeping its values in the file, so formulas in visible columns can still reference it.

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

var visibleMoneyStyle =
    ExcelStyle.Default.With(
        numberFormat: ExcelNumberFormatStyle.Custom("$#,##0.00"));

using (var writer = new ExcelStyledWriter("hidden-columns-for-internal-data.xlsx"))
{
    using (var sheet = writer.CreateWorksheet("Report"))
    {
        sheet.SetColumnStyle(1, ExcelColumnStyle.Default.With(width: 18d));
        sheet.SetColumnStyle(2, ExcelColumnStyle.Default.With(width: 14d));
        sheet.SetColumnStyle(3, ExcelColumnStyle.Default.With(hidden: true));
        sheet.SetColumnStyle(4, ExcelColumnStyle.Default.With(width: 14d));

        sheet.WriteRow("Item", "Visible total", "Internal code", "Reviewed total");

        sheet.WriteRow(
            new object?[] { "License", 998m, "INT-001", ExcelFormula.From("B2") },
            new ExcelStyle?[] { null, visibleMoneyStyle, null, visibleMoneyStyle });

        sheet.WriteRow(
            new object?[] { "Support", 275m, "INT-002", ExcelFormula.From("B3") },
            new ExcelStyle?[] { null, visibleMoneyStyle, null, visibleMoneyStyle });
    }

    writer.Close();
}

Style your own workbooks

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