Examples Index
All runnable examples are in examples/. Build and run with:
dotnet run --project examples/ExampleName/ExampleName.csproj
Generated files are written to examples/output/.
By Example
| Example | Format | Topics |
|---|---|---|
| UsageSamples | xlsx, xlsm, docx, pptx | Broad user-facing samples, macro preservation, read-back checks |
| Phase0WriteExample | xlsx | First workbook, create sheet, rows, cells, save |
| Phase1InteropExample | xlsx | Java POI interoperability, read/write fixtures |
| Phase25ImagesExample | xlsx | Image embedding with anchors |
| Phase3InterfaceExample | xlsx | IWorkbook / ISheet / IRow / ICell interfaces |
| Phase32DocxExample | docx | Paragraphs, runs, inline image, rotation |
| Phase33PptxExample | pptx | Slides, pictures, anchors, rotation, flip |
| Phase34AgileEncryptionExample | xlsx | Agile encryption and decryption |
| Phase4HssfXlsExample | xls | BIFF8 bootstrap write/read |
| Phase5FormulaEvaluatorExample | xlsx | Limited formula evaluator, cached formula results |
| Phase7CellTypesExample | xlsx | Numeric, string, boolean, formula, and error cell handling |
| Phase8CoreOnlyExample | xlsx | Core package without Formula |
| EdgeCaseProbeExample | xlsx, docx, pptx | Edge cases, encrypted sparse workbook, invalid inputs |
Recommended Starting Point
Start with UsageSamples if you want practical examples for the currently supported user workflows. It creates:
examples/output/usage-workbook.xlsxexamples/output/usage-macro-preserve.xlsmexamples/output/usage-document.docxexamples/output/usage-presentation.pptx
Use the phase-specific examples when you need a smaller sample for one API area.
Java Fixture Examples
Some examples rely on fixtures generated by the Java Apache POI test project.
mvn test -f tests/DotnetPoi.Interop.Tests/java/pom.xml -Dtest=WriteForDotnetTest
Run this before Phase1InteropExample or Phase7CellTypesExample if the expected fixture file is missing.