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 a note and a threaded comment
EnableTables EnableComments EnableThreadedCommentsBoth annotation kinds on one table — a legacy note on the header and a threaded comment on a data cell — showing they coexist as separate parts in the same workbook.
Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;
using System;
var stylingOptions =
new ExcelStylingOptions
{
EnableTables = true,
EnableComments = true,
EnableThreadedComments = true
};
var reviewer =
ExcelThreadedCommentPerson.Create(
"Rahul",
"rahul@example.com",
"PeoplePicker");
using (var writer = new ExcelStyledWriter("table-with-note-and-threaded-comment.xlsx", null, stylingOptions))
{
using (var sheet = writer.CreateWorksheet("Combined"))
{
sheet.WriteRow("Product", "Qty", "Revenue");
sheet.WriteRow("License", 2, 998m);
sheet.WriteRow("Support", 1, 275m);
sheet.WriteRow("Training", 3, 450m);
sheet.AddTable(
ExcelTable.Create(
"CombinedSalesTable",
"A1:C4",
new[]
{
ExcelTableColumn.Create("Product"),
ExcelTableColumn.Create("Qty"),
ExcelTableColumn.Create("Revenue")
},
ExcelTableStyle.Create("TableStyleMedium2")));
sheet.AddNote(
"A1",
ExcelNote.Create(
"Traditional note on the table header.",
"John"));
sheet.AddThreadedComment(
"C2",
ExcelThreadedComment.Create(
"Check the revenue amount for this row.",
reviewer,
new DateTimeOffset(2026, 7, 22, 10, 0, 0, TimeSpan.Zero)));
}
writer.Close();
}
Style your own workbooks
Styling is part of the same package — no separate install, no Excel, no COM automation.