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
4
examples
in Images and shapes
Multiple shapes as a workflow
EnableShapesPlaces three shape kinds across a row to sketch a process — rectangle, diamond, rounded rectangle — each anchored to its own cell and labelled with shape text.
Write.cs
using FormulaEngineer.Api;
using FormulaEngineer.Api.Styling;
var stylingOptions =
new ExcelStylingOptions
{
EnableShapes = true
};
using (var writer = new ExcelStyledWriter("multiple-shapes-workflow.xlsx", null, stylingOptions))
{
using (var sheet = writer.CreateWorksheet("Workflow"))
{
sheet.WriteRow("Workflow objects");
sheet.AddShape(
ExcelShape.Create(
ExcelShapeKind.Rectangle,
ExcelDrawingAnchor.OneCell(2, 3, 140d, 60d),
text: ExcelShapeText.Create("Import"),
name: "Import step"));
sheet.AddShape(
ExcelShape.Create(
ExcelShapeKind.Diamond,
ExcelDrawingAnchor.OneCell(5, 3, 140d, 60d),
text: ExcelShapeText.Create("Validate"),
name: "Validate step"));
sheet.AddShape(
ExcelShape.Create(
ExcelShapeKind.RoundedRectangle,
ExcelDrawingAnchor.OneCell(8, 3, 140d, 60d),
text: ExcelShapeText.Create("Export"),
name: "Export step"));
}
writer.Close();
}
Style your own workbooks
Styling is part of the same package — no separate install, no Excel, no COM automation.