Using IronXL License Keys

How to Get a License Key

Adding an IronXL license key allows you to deploy your project live without restrictions or watermarks.

You can buy a license key or sign up for a free 30-day trial key here.


Step 1: Download the Latest Version of IronXL

Start using IronXL in your project today with a free trial.

First Step:
green arrow pointer


The first thing we need to do is install the IronXL.Excel library, adding Excel functionality to the .NET framework.

Install with NuGet Package

  1. In Visual Studio, right-click on the project and select "Manage NuGet Packages ..."
  2. Search for the IronXL.Excel package and install

Or

  1. Enter the Package Manager Console
  2. Type:

    Install-Package IronXL.Excel

View the package on the NuGet site here.

DLL Direct Download Installation

Download the IronXL [.NET Excel DLL]() and manually install it into Visual Studio.


Step 2: Apply Your License Key

Set the license key inside your code

Add this code to the startup of your application, before IronXL is used.

// Set the IronXL license key for your project
IronXL.License.LicenseKey = "IRONXL-MYLICENSE-KEY-1EF01";
// Set the IronXL license key for your project
IronXL.License.LicenseKey = "IRONXL-MYLICENSE-KEY-1EF01";
' Set the IronXL license key for your project
IronXL.License.LicenseKey = "IRONXL-MYLICENSE-KEY-1EF01"
$vbLabelText   $csharpLabel

Set your key using Web.Config or App.Config in .NET Framework Applications

To apply a key globally to your application using Web.Config or App.Config, add the following key to your config file in appSettings.

<configuration>
  ...
  <appSettings>
    <!-- Define the IronXL license key -->
    <add key="IronXL.LicenseKey" value="IRONXL-MYLICENSE-KEY-1EF01"/>
  </appSettings>
  ...
</configuration>
<configuration>
  ...
  <appSettings>
    <!-- Define the IronXL license key -->
    <add key="IronXL.LicenseKey" value="IRONXL-MYLICENSE-KEY-1EF01"/>
  </appSettings>
  ...
</configuration>
XML

There is a known licensing issue between IronXL version 2023.4.13 - 2024.3.20 on project:

  • ASP.NET projects
  • .NET Framework version >= 4.6.2

The key stored in a Web.config file is NOT being picked up and used by the product. Visit the 'Setting License Key in Web.config' troubleshooting article to learn more.

Ensure that IronXL.License.IsLicensed returns true to verify.


Set your key using a .NET Core appsettings.json file

To apply a key globally to your .NET Core application:

  • Add a JSON file to your project called appsettings.json in the root directory of your project
  • Add a 'IronXL.LicenseKey' key to your JSON config file. The value should be your license key.
  • Ensure that the file properties include Copy to Output Directory: Copy always
  • Ensure that IronXL.License.IsLicensed returns true to verify.

File: appsettings.json

{
  "IronXL.LicenseKey": "IRONXL-MYLICENSE-KEY-1EF01"
}

Step 3: Test your key

Test if your key has been installed correctly.

// Check if a given license key string is valid.
bool result = IronXL.License.IsValidLicense("IRONXL-MYLICENSE-KEY-1EF01");

// Check if IronXL is licensed successfully
bool is_licensed = IronXL.License.IsLicensed;
// Check if a given license key string is valid.
bool result = IronXL.License.IsValidLicense("IRONXL-MYLICENSE-KEY-1EF01");

// Check if IronXL is licensed successfully
bool is_licensed = IronXL.License.IsLicensed;
' Check if a given license key string is valid.
Dim result As Boolean = IronXL.License.IsValidLicense("IRONXL-MYLICENSE-KEY-1EF01")

' Check if IronXL is licensed successfully
Dim is_licensed As Boolean = IronXL.License.IsLicensed
$vbLabelText   $csharpLabel

Note: After adding a license, always remember to clean and republish your application to avoid potential mistakes in deployment.


Step 4: Get started with your project

Follow our tutorial on how to Get Started with IronXL.


Questions?

If you have any questions, reach out to [email protected]

Frequently Asked Questions

How do I obtain an IronXL license key?

You can buy a license key or sign up for a free 30-day trial key through the IronXL website.

How do I install IronXL using NuGet Package Manager?

In Visual Studio, right-click on the project, select 'Manage NuGet Packages...', search for IronXL.Excel, and install it. Alternatively, use the Package Manager Console and type 'Install-Package IronXL.Excel'.

How can I manually install IronXL using a DLL?

Download the IronXL .NET Excel DLL and manually install it into Visual Studio.

How do I apply my IronXL license key in code?

Add the license key to the startup of your application with the code: IronXL.License.LicenseKey = "YOUR-LICENSE-KEY".

How can I set my IronXL license key in a Web.Config file?

Add the key to your config file in the appSettings section using:.

Is there a known licensing issue with specific IronXL versions?

Yes, there is a known issue with IronXL versions 2023.4.13 - 2024.3.20 in ASP.NET projects and .NET Framework version >= 4.6.2, where the key stored in Web.config is not picked up.

How do I apply my IronXL license key using appsettings.json in a .NET Core application?

Add a JSON file called appsettings.json to your project and include a 'IronXL.LicenseKey' entry with your license key. Ensure the file is set to 'Copy to Output Directory: Copy always'.

How can I verify if my IronXL license key is installed correctly?

Use IronXL.License.IsValidLicense("YOUR-LICENSE-KEY") to check if the key is valid, and IronXL.License.IsLicensed to ensure IronXL is successfully licensed.

What should I do after adding a license to IronXL?

Always remember to clean and republish your application to avoid potential mistakes in deployment.

Where can I find more help if I have questions about IronXL?

For further assistance, you can reach out to [email protected].