Closed Gibitop closed 4 years ago
Google sheets have a limited amount of rows and columns. So when you run out of that amount, you just add new row/columns. Even though GSheets has
insertRow
andinsertColumn
functions, they only work inside the given dimensions and it would be really useful to be able to widen the table when needed with just one function call. I see two ways in which this can be accomplished:
- Add new functions, that create a given amount of rows/columns outside of the current dimensions of the table
appendCol(int amount) { ... }
andappendRow(int amount) { ... }
- When the
insertValue
function is called, it creates needed space if the coordinates are outside of working range
Hi! Thanks for checking out GSheets library and providing your feedback!
Speaking of Worksheet
's isertRow
and insertColumn
methods - these methods are used to add new rows/columns in the middle of a sheet (so they should be inside current bounds).
Speaking of expanding sheets size - i believe that working with google sheets programmaticaly you should't really care about current row/column count, checking if there is enough space for inserting values and add space if not (with a method call). For that matter i made all methods that insert actual values into sheets with this «check» built in. Such methods would expand current sheet size to meet inserting range prior to insertion. It's my bad i didn't specified that in the docs.
You can also expand sheets size by requesting values out of its current bounds.
Can you please check and let me know if that works for you.
About your suggestion to add methods for appending rows/columns - i think it would be handy to have them, i'll add them in future release and let you know.
Thanks!
Added method you suggested in dev.5 version - see here
Thank you, I'll check it out shortly and let you know
Consider this issue closed.
Google sheets have a limited amount of rows and columns. So when you run out of that amount, you just add new row/columns. Even though GSheets has
insertRow
andinsertColumn
functions, they only work inside the given dimensions and it would be really useful to be able to widen the table when needed with just one function call. I see two ways in which this can be accomplished:appendCol(int amount) { ... }
andappendRow(int amount) { ... }
insertValue
function is called, it creates needed space if the coordinates are outside of working range