jennybc / googlesheets

Google Spreadsheets R API
Other
783 stars 191 forks source link

error message regarding number of columns to read in #356

Closed mmadmar closed 6 years ago

mmadmar commented 6 years ago

Hi all,

I am executing the following code:

gs_read(ws = "GA_pageviews_sessions", range = cell_cols(1:50))

and I am getting the following error message:

Accessing worksheet titled 'GA_pageviews_sessions'.
Error in jfun(limits[["max-col"]], ws_col_extent) : 
  limits[["max-col"]] must be less than or equal to ws_col_extent
limits[["max-col"]] = 50, ws_col_extent = 26

Does that mean that I can only import max 26 columns?

Thanks!

jennybc commented 6 years ago

It means that sheet only has 26 columns. Trying reading only range = cell_cols(1:26). Or don't specific the column range at all.

Perhaps a better design would be to do that for you or fill a suitably sized object with NAs. But that's unfortunately not how this function works.

mmadmar commented 6 years ago

Thanks,

leaving out the range helped.