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

Skip columns for a dashboard layout

Uses SkipColumns and SkipRows to leave deliberate gaps, arranging metric cards side by side with a narrow spacer column between them instead of a dense grid.

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

var cardStyle =
    ExcelStyle.Default.With(
        font: ExcelFontStyle.Default.With(
            bold: true,
            color: ExcelColor.FromRgb(255, 255, 255)),
        fill: ExcelFillStyle.Solid(
            ExcelColor.FromRgb(68, 114, 196)),
        alignment: ExcelAlignmentStyle.Default.With(
            horizontal: ExcelHorizontalAlignment.Center));

using (var writer = new ExcelStyledWriter("skip-columns-dashboard-layout.xlsx"))
{
    using (var sheet = writer.CreateWorksheet("Dashboard"))
    {
        sheet.SetColumnStyle(1, ExcelColumnStyle.Default.With(width: 16d));
        sheet.SetColumnStyle(2, ExcelColumnStyle.Default.With(width: 16d));
        sheet.SetColumnStyle(3, ExcelColumnStyle.Default.With(width: 4d));
        sheet.SetColumnStyle(4, ExcelColumnStyle.Default.With(width: 16d));
        sheet.SetColumnStyle(5, ExcelColumnStyle.Default.With(width: 16d));

        sheet.WriteRow(new object?[] { "Revenue", "$125,000" }, cardStyle);

        sheet.SkipColumns(3);
        sheet.WriteRow(new object?[] { "Margin", "18.4%" }, cardStyle);

        sheet.SkipRows(1);
        sheet.WriteRow("Detail section starts below the dashboard cards");
    }

    writer.Close();
}

Style your own workbooks

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