How to create an Excel file on Linux using Mono Develop

I am currently working on a C # .net project (in VS2010) that works with the Excel interface. However, at some point I will have to complete the project through Mono Develop and switch to our Linux server.

I heard that Excel switching does not work in Mono. Anyway, can I create and process Excel files using code using Mono?

Thanks a lot!

EDIT: Ideally, I would like to do it for FREE and still support formatting. I do not need read access, just write.

+6
source share
2 answers

Do you really need to use Excel itself? The problem here is not that Excel does not work with Mono, since Excel does not work with Linux. You might be able to do something hacked with Wine to run Excel and its associated COM interoperability on Linux, but I would suggest that Excel be completely abandoned if you intend to use Linux. There are several libraries for managing .xls and .xlsx files in a more cross-platform way: the whole StackOverflow question is about working with Excel files without using Excel.

Now, if you do more than just create files - for example, if you want to use the Excel calculation engine, then you probably have to use Excel itself. In this case, I see three clear options: (a) run Excel (and possibly your application) under Wine, and hope that it works, (b) use Excel for Mac and start the server with OS X or (c) use Windows I don’t know if options (a) and (b) will allow correct COM interoperability, although I would expect Wine to try to replicate all COM and Office for Mac, it has some kind of API that replaces COM interoperability. The third option can come in two options: you can use Windows Server to run your site, or you can select one computer or virtual machine in the Excel computing engine and connect with other parts of your web server code.

+2
source

I checked excelpackage.dll with MOMA and it did not report any warnings and errors. However, this may work on mono not verified. It is also a free GPL. http://excelpackage.codeplex.com/

0
source

Source: https://habr.com/ru/post/923925/


All Articles