mjul / docjure

Read and write Office documents from Clojure
MIT License
622 stars 129 forks source link

Changed row-seq and cell-seq to deal with blanks in spreadsheets #22

Closed kornysietsma closed 7 years ago

kornysietsma commented 10 years ago

Fix for https://github.com/mjul/docjure/issues/19

Added dense-row-seq, dense-cell-seq, and dense-select-columns for reading sparse spreadsheets without skipping blanks. Made new functions rather than changing existing ones, as the dense functions may be slower for large spreadsheets, and require extra handling of nil values.

Also fixed docstring for remove-row! (and added test) to clarify that rows are blanked, not removed.

Note I think there is still a problem calling select-name on a range with blanks, but that should be a separate issue (and separate pull request) when I get the chance.

acron0 commented 9 years ago

Would be really good to see this fix...

mjul commented 9 years ago

Is this the best way to do it or would it fit better in the way we read sheets by default so we don't trouble the developer with a choice of two different sheet reading models?

mediasense commented 8 years ago

How can I get access tis fix. I am trying to pass a bunch of xlsx some of which have empty cells. I have 1.6.0 in my dependencies do i need to do anything else?

iCodeSometime commented 8 years ago

@mediasense if you want to use something in a pull request before it's merged, you'd either have to fork and apply the commits yourself, or use the fork the patch came from, and hope it's currently buildable

kornysietsma commented 8 years ago

@mediasense You could also just copy the dense functions from the pull request into a namespace of your own - the functions are really short, and should be pretty safe to use.

Alternatively as suggested at https://github.com/mjul/docjure/issues/19#issuecomment-169315802 you could use with-redefs to replace the original functions in a single scope.

mjul commented 8 years ago

It seems like a useful extension. Would you care to update it to the latest master and add your name to the contributor list. Extra points will be awarded for adding an instructive example to the README.md so other users can benefit from your work. Thank you for your contribution!

kornysietsma commented 8 years ago

Updated as per discussion on #19