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?
I'm not sure if this is the most straight forward solution, but an xlsx file is nothing more than a zip of different things.
Try to rename your existing xlsx file to a .zip and unzip it. Then check how the content is configured. Probably at some kind you will come across a more normal file (likely an xml) which you can write to with something like a StreamWriter, then rezip the archive and rename it to get it back to a valid xlsx.
Again, not sure if this is the easiest solution given the limitations you have, but it's one of the most basic ways.
That’s why Pedro is the expert 😉
Thank you for the answer, Toon. I will probably not do this manually, as the solution mentioned by Pedro already manipulates the XML files which are extracted from the .xlsx file.