Using FlexCel with Mono
FlexCel is fully managed code without any external dependencies, and this makes it possible to run in different platforms besides Windows and .NET. It can be used via Mono or .NET Core in a Linux server, or on OSX, iOS and Android via Xamarin. In general, code should be 100% compatible between .NET and Mono, but there are some points worth noting.
For developing for Linux under MonoDevelop, you will have to manually copy FlexCel.dll to your development machine and add a reference to the assembly. Or if you prefer to develop in Visual Studio, then you don’t need to do anything. Just compile your app in Windows under Visual Studio, and copy the files to the Linux server. There is no need to recompile under Mono, as Mono can read the dlls that Visual Studio generates.
Probably one of the biggest problems you might get when using FlexCel in anything but Windows or OSX is the lack of fonts. Most of the default fonts in Excel are only present in Windows, and when you want to create a PDF file with them you will get a file that looks wrong. FlexCel needs to read the fonts to know the metrics, where the next character will go, where the line breaks are, etc.
We discuss how to deal with fonts when exporting in the Font Management section of the Pdf exporting guide; make sure you read it if you are thinking in deploying to Mono.
In a perfect world we wouldn’t have to write this section. But this is not a perfect world, and while Mono is a high quality piece of work, it has bugs, as does .Net or FlexCel itself. The problem being, that while .NET has bugs, you have probably tested in .NET, and workarounded them. But Mono has a different set of bugs, and the only way to know which, if any, affect you, is to test in Mono. We do regular testing in Mono, and most tests pass ok. But you might find issues, so test heavily.
.NET Core is positioning more and more as the best way to move your applications to Linux. But right now it lacks some features you might need in a full featured app, and it is not as mature.
Depending on your needs, mono might still be a better choice today.