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
Threaded comment for review
EnableThreadedCommentsWrites a modern threaded comment attributed to a named person with an explicit timestamp — the reviewable kind Excel shows in the comments pane, not a legacy note.
Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;
using System;
var stylingOptions =
new ExcelStylingOptions
{
EnableThreadedComments = true
};
var reviewer =
ExcelThreadedCommentPerson.Create(
"Asha",
"asha@example.com",
"PeoplePicker");
using (var writer = new ExcelStyledWriter("threaded-comment-review.xlsx", null, stylingOptions))
{
using (var sheet = writer.CreateWorksheet("Threaded"))
{
sheet.WriteRow("Task", "Owner", "Status");
sheet.WriteRow("Review dashboard", "Asha", "Pending");
sheet.WriteRow("Approve invoice", "Rahul", "Ready");
sheet.AddThreadedComment(
"C2",
ExcelThreadedComment.Create(
"Please confirm this status before publishing.",
reviewer,
new DateTimeOffset(2026, 7, 22, 9, 30, 0, TimeSpan.Zero)));
}
writer.Close();
}
Style your own workbooks
Styling is part of the same package — no separate install, no Excel, no COM automation.