from: https://epplussoftware.com/en/Home/GettingStartedCommunityLicense**
Installation**: Install EPPlus 8 from the EPPlus nuget feed.
The license can be set in three different ways:
// If you are a Noncommercial organization.
ExcelPackage.License.SetNonCommercialOrganization("My Noncommercial organization"); //This will also set the Company property to the organization name provided in the argument.
using(var package = new ExcelPackage(new FileInfo("MyWorkbook.xlsx")))
{
}
// If you use EPPlus for Noncommercial personal use.
ExcelPackage.License.SetNonCommercialPersonal("My Name"); //This will also set the Author property to the name provided in the argument.
using(var package = new ExcelPackage(new FileInfo("MyWorkbook.xlsx")))
{
}
{
{
"EPPlus": {
"ExcelPackage": {
"License": "NonCommercialOrganization:The noncommercial organization" //Please provide the name of the noncommercial organization you represent.
}
}
}
}
{
{
"EPPlus": {
"ExcelPackage": {
"License": "NonCommercialPersonal:Your Name" //Please provide your name
}
}
}
}
...or in the app.config...
<appSettings>
<add key="EPPlus:ExcelPackage:License" value="NonCommercialPersonal:Your name" />
</appSettings>
<appSettings>
<add key="EPPlus:ExcelPackage:License" value="NonCommercialOrganization:Your organization" />
</appSettings>
This might be the easiest way of configuring this. The example below is using the SETX command in the Windows console.
Noncommercial organization...
> SETX EPPlusLicense "NonCommercialOrganization:The Noncommercial organization"
Personal use...
> SETX EPPlusLicense "NonCommercialPersonal:Your Name"
The variable can be set on the process, user or machine level.