gimite / google-spreadsheet-ruby

Ruby library to read/write Google Spreadsheet
Other
306 stars 52 forks source link

Specifying "max_cols" and "max_rows" when calling add_worksheet does not work as advertised #7

Closed bmblack34 closed 14 years ago

bmblack34 commented 14 years ago

When I add a new worksheet to a given spreadsheet, I can only successfully do so if I do not specify max_cols and max_rows in my call to add_worksheet.

For example, the following works:

w = spreadsheet.add_worksheet("I can haz worksheetz!?")

But the following, does not work:

w = spreadsheet.add_worksheet("I can haz worksheetz!?", 2, 10)

The second example results in an empty worksheet being created that has 0 rows and 0 cols and cannot be edited at all.

The workaround I've been using is to create a worksheet without max_rows and max_cols, then modify those values afterwards but it would be great to get that working in the initial call to add_worksheet.

gimite commented 14 years ago

Hmm it works fine for me. What's your Ruby version, and what's version of google-spreadsheet-ruby, if you installed it from gem?

I checked it with: ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux] google-spreadsheet-ruby 0.1.1