I have built a spreadsheet that pulls NBA player props from Draftkings Sportsbook. The script worked fine the first time I ran it and pulled the appropriate data. However, when I went in today to re-run the script and pull the updated prop lines the data in each tab did not change. The only work around I could figure out was to copy each script file, run the script, and then delete the duplicate script file. I assume there has to be a better/different way of doing this. I attached a link to the googlesheet that also has access to the app script. Any guidance would be appreciated!
Upon testing after the modifications, it did update current data on the respective sheet.
Note:
- The reason why your workaround works is that the function that belongs to the last script will be the one that is executed.
Test:
Output:
Thus continuously duplicating the script to the bottom with the same function name will be the one to be executed.