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

Line chart with markers

EnableCharts

Plots two series on one chart, each with its own value range but a shared category axis — the shape most trend comparisons need.

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

var stylingOptions =
    new ExcelStylingOptions
    {
        EnableCharts = true
    };

using (var writer = new ExcelStyledWriter("line-chart-with-markers.xlsx", null, stylingOptions))
{
    using (var sheet = writer.CreateWorksheet("Trend"))
    {
        sheet.WriteRow("Month", "North", "South");
        sheet.WriteRow("Jan", 10, 7);
        sheet.WriteRow("Feb", 14, 11);
        sheet.WriteRow("Mar", 12, 16);
        sheet.WriteRow("Apr", 18, 15);

        sheet.AddChart(
            ExcelChart.Create(
                ExcelChartKind.LineWithMarkers,
                ExcelDrawingAnchor.OneCell(5, 2, 460d, 260d),
                new[]
                {
                    ExcelChartSeries.Create("North", "'Trend'!$A$2:$A$5", "'Trend'!$B$2:$B$5"),
                    ExcelChartSeries.Create("South", "'Trend'!$A$2:$A$5", "'Trend'!$C$2:$C$5")
                },
                title: "Regional trend",
                categoryAxisTitle: "Month",
                valueAxisTitle: "Score"));
    }

    writer.Close();
}

Style your own workbooks

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