79576565

Date: 2025-04-16 06:57:03
Score: 4
Natty:
Report link

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:

1. Use the License property on the ExcelPackage class
// 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")))
{

}
        
2. appSettings.json
            {
    {
    "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>
            
            
3. Set the environment variable 'EPPlusLicense'

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.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please provide
  • RegEx Blacklisted phrase (2.5): Please provide your
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Pvria Ansari