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

Pie chart with data labels

EnableCharts

A single-series pie with data labels turned on, showing how a composition breakdown differs from the category/value pairing a column chart uses.

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

var stylingOptions =
    new ExcelStylingOptions
    {
        EnableCharts = true
    };

using (var writer = new ExcelStyledWriter("pie-chart-summary.xlsx", null, stylingOptions))
{
    using (var sheet = writer.CreateWorksheet("Mix"))
    {
        sheet.WriteRow("Category", "Value");
        sheet.WriteRow("Licenses", 58);
        sheet.WriteRow("Support", 27);
        sheet.WriteRow("Training", 15);

        sheet.AddChart(
            ExcelChart.Create(
                ExcelChartKind.Pie,
                ExcelDrawingAnchor.OneCell(4, 2, 420d, 260d),
                new[]
                {
                    ExcelChartSeries.Create(
                        "Share",
                        "'Mix'!$A$2:$A$4",
                        "'Mix'!$B$2:$B$4")
                },
                title: "Revenue mix",
                showDataLabels: true));
    }

    writer.Close();
}

Style your own workbooks

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