bitfocus/companion-module-google-sheets

Found 2 Bugs and a fix in Adjust Cell ( Increase and Decrease ) Functions

Ton80Live opened this issue · 2 comments

Describe the bug
The Adjust Cell worked for "set", but not "Increase" or "Decrease".

My page was called Sheet 1; Set worked, Increase/Decrease did not
Created another page called 180; Set worked, Increase/Decrease did not

Created another page and DID NOT change the name, Sheet5; Set/Increase/Decrease worked.
Created another page Sheet73, Set/Increase/Decrease worked
If you rename the sheet with a space or just numbers Increase/Decrease will not work.

To Reproduce
Steps to reproduce the behaviour:

  1. go to google sheets
  2. add a new sheet and rename it with spaces in the name or just numbers
  3. then create a new sheet and with no spaces and characters and numbers
  4. instance(Google Sheets): Error executing action: Cannot read property 'values' of undefined

Expected behaviour
Increase/Decrease functions will not work in SHEETS with spaces or with no numeric only.

System (please complete the following information):

  • OS: Win 11
  • Browser: Chrome Version 113.0.5672.93 (Official Build) (64-bit)
  • Companion Version: (2.4.2+4911-v2-4.2-fcb5a863)

Thank you for the report.

The issue was caused by Google where any sheet name containing a space, or just numbers,, gets encoded with additional single quotes ', but only in certain parts of the API, while other parts of the API return the sheet name as it is written without any additional quotes. I expect the issue would have also occurred with other sheet names that may contain special characters.

This should be resolved in the latest commit, v1.0.2, which should be updated in Companion soon, but as you're running an old version of Companion you'll need to migrate to Companion v3.