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
Multiple tables on one sheet
EnableTablesTwo independent tables stacked on one worksheet, separated by skipped rows. Each carries its own name, range, and style, and Excel treats them as separate objects.
Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;
var stylingOptions =
new ExcelStylingOptions
{
EnableTables = true
};
using (var writer = new ExcelStyledWriter("multiple-tables-workbook.xlsx", null, stylingOptions))
{
using (var sheet = writer.CreateWorksheet("Workbook Tables"))
{
sheet.WriteRow("Region", "Revenue");
sheet.WriteRow("North", 125000m);
sheet.WriteRow("South", 98000m);
sheet.AddTable(
ExcelTable.Create(
"RevenueTable",
"A1:B3",
new[]
{
ExcelTableColumn.Create("Region"),
ExcelTableColumn.Create("Revenue")
},
ExcelTableStyle.Create("TableStyleMedium2")));
sheet.SkipRows(2);
sheet.WriteRow("Service", "Tickets");
sheet.WriteRow("Import", 18);
sheet.WriteRow("Export", 11);
sheet.AddTable(
ExcelTable.Create(
"TicketTable",
"A6:B8",
new[]
{
ExcelTableColumn.Create("Service"),
ExcelTableColumn.Create("Tickets")
},
ExcelTableStyle.Create("TableStyleMedium6")));
}
writer.Close();
}
Style your own workbooks
Styling is part of the same package — no separate install, no Excel, no COM automation.