Getting started - Setting the license key

License key for Commercial Use

From EPPlus 8 and later versions, you need to specify the license before using EPPlus. This must be set both in the development and in the runtime environments.

Where can I find my license key?

If you already have a commercial license, you will find it in the My Licenses section here on our website once you have logged in. If you encounter any issues accessing the license key, please reach out to EPPlus Software, and we will assist you.

For purchasing EPPlus commercial licenses, see this page.

Information to developers

Installation: Install EPPlus 8 and later from the EPPlus nuget feed.

As a holder of a commercial license you must set your license key before using EPPlus in your code.

The Licence key can be set in three different ways:

1. Use the ExcelPackage.License.SetCommercial(string) method
            // To set your license key from code, use the static method ExcelPackage.License.SetCommercial
ExcelPackage.License.SetCommercial("<Your License key>");  //Sets your license key in code.

using(var package = new ExcelPackage(new FileInfo("MyWorkbook.xlsx")))
{

}
        
2. appSettings.json
            {
    {
    "EPPlus": {
        "ExcelPackage": {
            "License": "Commercial:<Your License key>"
            }
        }
    }
}
        

...or in the app.config...

            <appSettings>
    <!--The license context used-->
    <add key="EPPlus:ExcelPackage:License" value="Commercial,<Your License key>" />
</appSettings>
            
3. Set the environment variable 'EPPlusLicense'

This might be the easiest way of configuring this. Set the variable to Commercial:<Your License Key> The example below set the license key using the SETX command in the Windows console on the user level, but you can set it in any way you prefer.

            > SETX EPPlusLicense "Commercial:<Your License key>"
            
The variable can be set on the process, user or machine level.
Developer resources

A more detailed getting started information is available in our developer wiki.

Our sample projects on github is a good starting point. Here you will also find the source code for EPPlus, our issue tracker and branches for our ongoing new development.

More developer information can be found here.