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

Wrapped rows with custom height

Uses WriteRowWithLayout to set an explicit row height alongside per-cell styles, so multi-line wrapped notes are fully visible instead of being clipped to a single line.

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

var wrappedStyle =
    ExcelStyle.Default.With(
        alignment: ExcelAlignmentStyle.Default.With(
            wrapText: true,
            vertical: ExcelVerticalAlignment.Top));

using (var writer = new ExcelStyledWriter("wrapped-rows-with-custom-height.xlsx"))
{
    using (var sheet = writer.CreateWorksheet("Notes"))
    {
        sheet.SetColumnStyle(1, ExcelColumnStyle.Default.With(width: 18d));
        sheet.SetColumnStyle(2, ExcelColumnStyle.Default.With(width: 44d));

        sheet.WriteRow("Area", "Status");

        sheet.WriteRowWithLayout(
            new object?[]
            {
                "Import",
                "Completed successfully.\nThe input workbook was streamed and validated before export."
            },
            ExcelRowStyle.Default.With(height: 48d),
            new ExcelStyle?[] { null, wrappedStyle });

        sheet.WriteRowWithLayout(
            new object?[]
            {
                "Review",
                "Pending approval.\nFinance needs to confirm the final tax amount."
            },
            ExcelRowStyle.Default.With(height: 48d),
            new ExcelStyle?[] { null, wrappedStyle });
    }

    writer.Close();
}

Style your own workbooks

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