Setting Up a License File for Sheetize
Goal: Load a valid license file so that the Sheetize NuGet/DLL library unlocks all premium features.
The steps below work for any .NET language (C#, VB.NET, C++, F#, etc.) and for projects that reference Sheetize either via NuGet or by directly adding the compiled .dll.
1 – Obtain Your License File
| Source | How to Get It |
|---|---|
| The purchase page | Download Sheetize.*.lic after checkout. |
Important: Keep the file in a read‑only location that is included in your deployment, or in a secure folder next to the executable. Do not commit the license file to a public source repository to avoid exploitation.
2 – Add the License File to Your Project (optional)
| IDE / Build System | Steps |
|---|---|
| Visual Studio (any .NET project) | 1. Right‑click the project → Add → Existing Item… → select Sheetize.*.lic. |
| 2. Set Build Action to Content. | |
| 3. Set Copy to Output Directory to Copy if newer (or Copy always). |
Tip: If you have multiple environments (dev, test, prod) you can keep a separate license file per folder (
licenses/dev/,licenses/prod/) and copy the correct one at build‑time using a Condition attribute.
3 – Initialise Sheetize with the License File
The Sheetize library expects you to call LicenseManager.Load(string path) once before using any other Sheetize APIs. Below are language‑specific snippets.
C# (most common)
using Sheetize; // Namespace of the library
using System;
using System.IO;
public static class Program
{
private static void Main()
{
// Path is relative to the running EXE's folder (where the file was copied)
string licensePath = "/path/to/Sheetize.PdfConverter_for_.NET.lic";
License license = new Sheetize.License();
license.SetLicense(licensePath);
// Now you can use premium features
var loadOptions = new LoadOptions
{
InputFile = "/path/to/sample.xlsx"
};
var saveOptions = new SpreadsheetSaveOptions
{
OutputFile = "/path/to/sample.pdf"
};
SpreadsheetConverter.Process(loadOptions, saveOptions);
// .
}
}4 – Verify the License at Runtime
A common check is to confirm that the generated output does not contain the water‑mark. If the water‑mark is absent, the license file has been read correctly.
You’re Ready!
- Add the
Sheetize.*.licfile to your project and mark it to copy to the output folder. - Call
SetLicense(...)before any Sheetize usage. - Deploy the license file together with your binaries (or via a secure mount).
Once these steps are in place, all paid Sheetize capabilities—advanced charting, high‑performance streaming, multi‑sheet encryption, etc.—will be fully unlocked for your users, regardless of whether they are coding in C#, VB.NET, C++/CLI, or any other .NET‑supported language.
Happy coding!
(*) this text may vary depending on the edition.