Iwark / spreadsheet

Google Go (golang) library for reading and writing spreadsheet files on Google Docs.
MIT License
382 stars 53 forks source link

Consider making utils functions public and potentially add a couple #21

Open grugnog opened 6 years ago

grugnog commented 6 years ago

I happened to write a couple of utility functions during a project and was wondering if one or both would be useful to others.

The first is the exact opposite of numberToLetter(). The second parses "sheet?A1:Z5" type references into values than can be looped over to retrieve a subset of the sheet - this is not very generalized (it doesn't handle non-range references, for instance) but was sufficiently useful in my case, which was allowing a configurable input range in a recognizable format. This PR also renames numberToLetter to NumberToLetter so it is exported and also a utility function (since it was also generally useful).

If there is interest I would be happy to take a pass at function docs and tests. I did a bit of testing for letterToNumber making sure it worked for even large letter combinations (ZZZZ etc), but was working in a separate project and so they would need adapting.

Iwark commented 6 years ago

Hi @grugnog , Thanks for the PR! It seems very nice :) Can you please proceed with the docs, golint and tests?