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 Charts and sparklines

Clustered column chart

EnableCharts

Adds a real Excel chart part backed by a worksheet range, with a title and both axis labels. The chart stays linked to the cells, so editing the data redraws it.

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

var stylingOptions =
    new ExcelStylingOptions
    {
        EnableCharts = true
    };

using (var writer = new ExcelStyledWriter("clustered-column-chart.xlsx", null, stylingOptions))
{
    using (var sheet = writer.CreateWorksheet("Sales"))
    {
        sheet.WriteRow("Month", "Revenue");
        sheet.WriteRow("Jan", 12000);
        sheet.WriteRow("Feb", 14500);
        sheet.WriteRow("Mar", 13200);
        sheet.WriteRow("Apr", 16800);

        sheet.AddChart(
            ExcelChart.Create(
                ExcelChartKind.ColumnClustered,
                ExcelDrawingAnchor.OneCell(4, 2, 420d, 240d),
                new[]
                {
                    ExcelChartSeries.Create(
                        "Revenue",
                        "'Sales'!$A$2:$A$5",
                        "'Sales'!$B$2:$B$5")
                },
                title: "Monthly revenue",
                categoryAxisTitle: "Month",
                valueAxisTitle: "Revenue"));
    }

    writer.Close();
}

Style your own workbooks

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