FlexCel Installation Guide
Choosing how to install FlexCel
You can install FlexCel in 2 different ways:
- If installing in Windows, you can just run the setup.exe downloaded from our website. It will install all the examples, the dlls, the NuGet packages and the docs.
- If installing in macOS, we don't have an automatic setup, but you can download the NuGet packages from our website, register them, and use them. You should still install the full FlexCel with setup.exe in a Windows machine to be able to see and run all the examples.
Registering the FlexCel NuGet packages
If you installed FlexCel via setup.exe, then you don't need to do anything else: Setup should have registered the FlexCel NuGet packages for you. If you downloaded the NuGet packages directly, then you need to put them in a private NuGet repository.
Important
Because FlexCel is not open source, the FlexCel NuGet packages must be put inside a private repository that only people with a license can access it. Please don't put them in a public repository like nuget.org.
There are many ways to put FlexCel in a private repository, and depending on your needs you might find some better than others. You can read about it here: https://docs.microsoft.com/en-us/nuget/hosting-packages/overview
However, the simplest way is just to add the folder where the FlexCel NuGet packages are to the NuGet feeds. Even when https://docs.microsoft.com/en-us/nuget/hosting-packages/overview mentions putting them in a network share, there is no need to share the folder. You can use a simple not shared folder, and this is what the FlexCel Setup does. To do it manually when you are not using Setup.exe follow the steps below:
If you want to install from inside Visual Studio, go to Menu->Tools->NuGet Package Manager->Package Manager Console. If you don't have Visual Studio, you can install NuGet following the instructions in https://docs.microsoft.com/en-us/nuget/guides/install-nuget
Either from the Package Manager console, a command line prompt or a terminal, type:
nuget sources Add -name flexcel.tmssoftware.com -Source <path-to-where-the-flexcel-package-is>
So if for example the FlexCel package is at C:\Users\adrian\Documents\TMSSoftware\FlexCelNET\nuget
your screen should look as follows:
Note
You can also visually manage your package sources by going to Menu->Tools->NuGet Package Manager->Package Manager Options:
But in this guide we preferred to focus on the command line way, because it allows you to register nuget sources even if Visual Studio is not available.
For uninstalling the source, just go to the package manager options and remove it, or type:
nuget sources Remove -name flexcel.tmssoftware.com
Referencing the FlexCel NuGet packages
Once you have the nuget sources set up, either because you used setup.exe or because you set them up manually, you need to reference them from your project. To do that, right-click your project, and select Manage NuGet Packages:
Once in the package manager, follow the steps:
- Select Browse
- Select All as the package source.
- Search for FlexCel
- Select the TMS.FlexCel package.
- Press Install.
Note
In step 2, you could have selected "flexcel.tmssoftware.com" as source instead of "All", to be able to find FlexCel faster. But if you selected flexcel.tmssoftware.com it wouldn't be able to resolve dependencies to other packages in nuget.org.
So to be safe, make sure to select All and search for FlexCel, instead of selecting the flexcel.tmssoftware.com feed
Note
Normally the only package you need to install is TMS.FlexCel. This package includes almost all the functionality in FlexCel. But when doing WinForms apps, there is an Excel previewer available in the TMS.FlexCel.WinForms package that you might also want to use. For WebForm apps, there is also a viewer which is available in the TMS.FlexCel.WebForms package.
The extra packages only work in Windows and in WinForms or WebForms apps. For all other kinds of apps, the only package that you need and can install is TMS.FlexCel.
Manually Referencing FlexCel
If you prefer not to work with nuget packages, FlexCel setup also installs the dlls directly. Instead of adding the NuGet package, you can just right click in the "References" entry in your project, select "Add Reference" and manually add the FlexCel.dll that is needed for your platform and framework type.
Note
In FlexCel for .NET Core you can't manually reference the assemblies and the only choice is via NuGet.