[NEW FEAT.] Add URL validation process to avoid Google Apps Script's Exception: Invalid argument: url
Error
#324
Labels
enhancement
New feature or request
Discussed in #323
Background
There are several ways in which you can specify a spreadsheet by its URL:
https://docs.google.com/spreadsheets/d/<sheet-id>/edit#gid=0
gid
:https://docs.google.com/spreadsheets/d/<sheet-id>/edit
https://docs.google.com/spreadsheets/d/<sheet-id>/
/
:https://docs.google.com/spreadsheets/d/<sheet-id>
Patterns 1 - 4 all work fine if you are simply entering the URL in your browser, but it is not so in Google Apps Script (GAS), which is the underlying architecture behind Group Merge. In GAS, Patterns 1 - 3 are acceptable, while Pattern 4 returns the error in the title.
Current workaround
Following the How-to-Use steps in the add-on's webpage would be the easiest way to avoid it; you can let the add-on enter the spreadsheet URL automatically at step 4.
Adding URL Validation
Since the add-on allows users to enter the spreadsheet URL freely, it would be better to have a validation step to check the URL format and add
/edit
to the end of the URL when necessary to avoid the error.The text was updated successfully, but these errors were encountered: