Hi Dojo,
I need to develop a connector which reads and writes to an excel file. I can't use Microsoft COM objects because the customer doesn't have Microsoft Office installed. I've tried multiple NuGet packages, but they need licenses to be used commercially.
Does anyone have a suggestion on how to approach this?
In case someone comes across the same question, I'll leave an update. I ended up using OpenXML for my case. It is well documented by Microsoft itself.
Although it's a bit of a hassle to manipulate data inside the excel, as the package uses internal structure of the excel. For example: cells can have multiple value types (integer, string, date, datetime, etc.), but a particularly interesting one is shared string, where the index of the cell from shared strings table is the actual cell value (e.g. cell A3 has the value 12, where 12 represents 12th entry in the shared strings table).
To modify a cell of type shared string, you need to browse the shared strings table manually to find the value you want to enter, and add it to the end of the table if it doesn't exist.
Besides that, the package is straightforward and easy to use.