Created
May 23, 2017 07:22
-
-
Save anonymous/88f80fd48b37916edd6cd41825e628e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# batch clear method | |
# [array of ranges], spreadsheet_id, Google::Apis::SheetsV4::SheetsService | |
def batch_clear_ranges(arr, spr_id, srvc) | |
clear_request = Google::Apis::SheetsV4::BatchClearValuesRequest.new | |
clear_request.ranges = arr | |
puts "Clearing Range(s): #{arr}" | |
resp = srvc.batch_clear_values(spr_id, clear_request) | |
puts "Cleared: #{resp.to_h[:cleared_ranges]}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment