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
Cells and text
10
Layout
10
Conditional formatting
6
Named styles and themes
4
Tables and notes
10
Images and shapes
4
Charts and sparklines
6
Dashboards
4
Example
10
examples
in Layout
Hidden rows for audit notes
Writes an audit trail row and hides it via a row style, so the provenance travels with the workbook without cluttering the summary a reader sees.
Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;
var noteStyle =
ExcelStyle.Default.With(
font: ExcelFontStyle.Default.With(
italic: true,
color: ExcelColor.FromRgb(89, 89, 89)));
using (var writer = new ExcelStyledWriter("hidden-rows-for-audit-notes.xlsx"))
{
using (var sheet = writer.CreateWorksheet("Summary"))
{
sheet.WriteRow("Metric", "Value");
sheet.WriteRow("Revenue", 125000m);
sheet.WriteRow("Margin", 0.18);
sheet.WriteRowWithLayout(
new object?[] { "Audit note", "Source data imported from batch 2026-07-22" },
ExcelRowStyle.Default.With(hidden: true),
new ExcelStyle?[] { noteStyle, noteStyle });
sheet.WriteRow("Status", "Ready");
}
writer.Close();
}
Style your own workbooks
Styling is part of the same package — no separate install, no Excel, no COM automation.