Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Error when the workbook has multiple sheets #14

Description

@Zweitze

A colleague came to me because this script was giving errors. He deployed the solution, but he ended up with multiple sheets - I have no idea how he managed that. Funny enough, menu function "Only check weather" works as advertised. But running "Check weather and sync DV360" gives this error in the log:

TypeError: Cannot read property '0' of undefined
    at forceFormulasEval(Code:505:59)
    at main(Code:1712:41)
    at monitorWeatherAndSyncWithDV360(Code:1762:12)

The problem: function forceFormulasEval assumes the default sheet to be the Triggers sheet. Applying the following change will fix the problem:

  forceFormulasEval(row, col) {
    //return this.get(`R${row}C${col}`, 'UNFORMATTED_VALUE')[0][0];
    return this.get(`${configSpreadsheetName}!R${row}C${col}`, 'UNFORMATTED_VALUE')[0][0];
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions