matthewdowney / excel-clj

Write Excel docs & PDFs with Clojure data, from higher level abstractions (tree, table) or via a manual grid specification.
Eclipse Public License 1.0
149 stars 9 forks source link

No methods for reading data from excel? #12

Open efraimmgon opened 2 years ago

efraimmgon commented 2 years ago

First of all, thank you for providing a library that is well designed and easy to follow even if you have to dig into the source code.

Now, I haven't seem any methods to read data from excel. At least for me, that is essential, since when automating excel workflows we usually retrieve the data from the excel sheets themselves.

Having to use different libraries for reading and writing is a little annoying.

matthewdowney commented 2 years ago

Hey @efraimmgon, it's true that there is no way to read using excel-clj.

This is a feature that I would be happy to accept a PR for, and might get time to look into myself over the holidays.

The main challenge I see is reading cell style data — there are so many options, and extracting them all from the Apache POI objects is a real pain due to nested objects, each of which typically contains a myriad of defaults. I'm wondering if in your case, an implementation that ignores cell style when reading would still be useful?

efraimmgon commented 2 years ago

I liked your library because it had what I was looking for: a simple, functional way of using clojure with excel sheets.

I expected similar functionality for reading. I can see the problem that you mention. For my spreadsheet projects all I care about is the raw data. Perhaps having a fn that returns that and then iterating from there is the right call.

In any case, I can still style cell data when writing, which for 90% of projects would be good enough, because when I'm reading I think what is most important is the cell values themselves.

jacobemcken commented 7 months ago

For reading Excel data this lib might be of use: https://github.com/kbosompem/bb-excel