You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:
I'm managing data in our company, and one of the use cases is exporting data to google sheet. Other persons are allowed to work with those spreadsheets, which sometimes leads to errors. I did run multiple times into Google::Apis::ClientError: badRequest: Invalid requests[0].updateSheetProperties: Sorry, it is not possible to delete all non-frozen rows.
because someone froze the header row for filtering.
So, I would like to easily unfreeze rows before updating data.
That led me to add @frozen_rows to the Worksheet class working the same way as @max_col and @max_row, easily allowing me to check or change this property.
# Saves your changes made by []=, etc. to the server.defsavesent=falseif@meta_modifiedadd_request({update_sheet_properties: {properties: {sheet_id: sheet_id,title: title,index: index,grid_properties: {row_count: max_rows,column_count: max_cols,frozen_row_count: frozen_rows},},fields: '*',},})end
...
is there a simple way to do this in my code without changing gem?
I didn't find any, that's why I started changing gem code
is there a reason not to add this to gem?
I realize it adds code, but as ruby is about developer comfort, I find it a worthy tradeoff
I also realize that maybe it would make sense to do a more general solution for editing properties (I'm not adding frozen_cols as I don't need that now), but I'm quite new to ruby development and not feeling comfortable with finding abstractions for this.
is there a way to add this to code in a better way?
The text was updated successfully, but these errors were encountered:
janpeterka
changed the title
Add frozen_rows to easily check/modify
Add @frozen_rows to easily check/modify
Feb 8, 2021
Background:
I'm managing data in our company, and one of the use cases is exporting data to google sheet. Other persons are allowed to work with those spreadsheets, which sometimes leads to errors. I did run multiple times into
Google::Apis::ClientError: badRequest: Invalid requests[0].updateSheetProperties: Sorry, it is not possible to delete all non-frozen rows.
because someone froze the header row for filtering.
So, I would like to easily unfreeze rows before updating data.
That led me to add
@frozen_rows
to the Worksheet class working the same way as@max_col
and@max_row
, easily allowing me to check or change this property.Suggestion
Add
@frozen_rows
toWorksheet
classWould like the insight from other devs on:
frozen_cols
as I don't need that now), but I'm quite new to ruby development and not feeling comfortable with finding abstractions for this.The text was updated successfully, but these errors were encountered: