Skip to content

Getting Started

Feel free to start discussion for any new feature requirement. Discussion Channel

The library is available on NuGet. You can install it using the following command

Terminal window
#Using Package Manager
Install-Package OpenXMLOffice

#Using .NET CLI dotnet add package OpenXMLOffice.Presentation

Terminal window
# For Pre Release
dotnet add package OpenXMLOffice.Presentation --prerelease
Terminal window
#Using .NET CLI
dotnet add package OpenXMLOffice.Spreadsheet
Terminal window
# For Pre Release
dotnet add package OpenXMLOffice.Spreadsheet --prerelease
Codacy BadgeCodacy Badge

The official release NuGet packages for OpenXMLOffice on NuGet.org:

PackageMaintenanceCurrent Stable ReleaseCurrent Alpha Release
OpenXMLOffice.PresentationActivebadgebadge
OpenXMLOffice.SpreadsheetActivebadgebadge
OpenXMLOffice.DocumentNAbadgebadge

Once Installed the package should be direct use available like below example. More samples can be seen in test project’s of the repo or check other parts of the documents

using OpenXMLOffice.Presentation_2007;
public static main(){
PowerPoint powerPoint = new();
powerPoint.AddSlide(PresentationConstants.SlideLayoutType.BLANK);
powerPoint.SaveAs(string.Format("../../test-{0}.pptx", DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")));
}
using OpenXMLOffice.Spreadsheet_2007;
public static main(){
Excel excel = new();
excel.AddSheet("Sheet1");
excel.SaveAs(string.Format("../../test-{0}.xlsx", DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")));
}