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 Tables and notes
Table with formula columns
EnableTablesAn invoice table where the net column is a live formula per row, so the table stays calculable rather than holding values computed in C#.
Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;
var stylingOptions =
new ExcelStylingOptions
{
EnableTables = true
};
using (var writer = new ExcelStyledWriter("table-with-formulas.xlsx", null, stylingOptions))
{
using (var sheet = writer.CreateWorksheet("Invoice"))
{
sheet.WriteRow("Item", "Qty", "Unit price", "Net");
sheet.WriteRow("License", 2, 499m, ExcelFormula.From("B2*C2"));
sheet.WriteRow("Support", 1, 275m, ExcelFormula.From("B3*C3"));
sheet.WriteRow("Training", 3, 150m, ExcelFormula.From("B4*C4"));
sheet.AddTable(
ExcelTable.Create(
"InvoiceTable",
"A1:D4",
new[]
{
ExcelTableColumn.Create("Item"),
ExcelTableColumn.Create("Qty"),
ExcelTableColumn.Create("Unit price"),
ExcelTableColumn.Create("Net")
},
ExcelTableStyle.Create("TableStyleMedium4")));
}
writer.Close();
}
Style your own workbooks
Styling is part of the same package — no separate install, no Excel, no COM automation.