Is there a way to process all of the Named Ranges in a Google Sheet?
Google Documents has .getNamedRanges()
, but I can't find anything similar for sheets. I want to read and print each range parameter.
My end goal is to fix a lot of named ranges en masse. There are more than 200 in the document in question.
There's a bug in sheets (Documented here) and since default ranges in Named Ranges have the entire span of merged cells (ie: A1:J1
), but named ranges only work in formulas if you specify JUST the first cell, I thought I could save a lot of time by just accepting the default named range (A1:J1
as an example) and then script it so I can just strip everything off of the end, leaving just A1
. In order to do this, I need to simply be able to get a list of all named ranges in the sheet.
Is this possible?