I had a problem: I need to import data from a program on .Net into an XLS file (MS Excel format). You must also be able to set fonts, colors, print options and other useless properties for the data in the file.
Microsoft suggests that you run Excel and access it. And this is the only way to work with the format, officially supported by the company. It goes without saying that MS Office must be installed on every computer on which my program will run. And it doesn’t bother anyone that even to write a banal table of 10 cells to a file you have to run a multi-megabyte monster - Excel.
In general, I decided to find another way. As it turned out, there are many libraries that work with XLS files directly, without running Excel. But the vast majority of them are paid.
')
Of the free libraries, I identified two:
- MyXLs - written in C #, MIT license, supports basic reading and writing, formatting. The project is developing.
- JExcelAPI - written in Java, LGPL, a very powerful library - supports almost everything you need (including images and formulas)
Unfortunately, I did not find a fully functional free library for .Net. However, JExcelAPI is easily launched using
IKVM . This, of course, is not the most elegant solution, but it works. And in those cases when you need only basic functionality, you can use MyXLs.