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 sparklines in a trend table

EnableSparklines

Puts a miniature line chart inside a cell at the end of each row, with markers and high/low points highlighted, so a table carries its own trend column.

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

var stylingOptions =
    new ExcelStylingOptions
    {
        EnableSparklines = true
    };

using (var writer = new ExcelStyledWriter("line-sparklines-trend-table.xlsx", null, stylingOptions))
{
    using (var sheet = writer.CreateWorksheet("Trends"))
    {
        sheet.AddSparklineGroup(
            ExcelSparklineGroup.Create(
                new[]
                {
                    ExcelSparkline.Create("'Trends'!$B$2:$E$2", 2, 6),
                    ExcelSparkline.Create("'Trends'!$B$3:$E$3", 3, 6),
                    ExcelSparkline.Create("'Trends'!$B$4:$E$4", 4, 6)
                },
                type: ExcelSparklineType.Line,
                showMarkers: true,
                showHighPoint: true,
                showLowPoint: true));

        sheet.WriteRow("Region", "Jan", "Feb", "Mar", "Apr", "Trend");
        sheet.WriteRow("North", 10, 12, 9, 15, null);
        sheet.WriteRow("South", 8, 7, 12, 6, null);
        sheet.WriteRow("West", 5, 9, 11, 14, null);
    }

    writer.Close();
}

Style your own workbooks

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