Google Scripts Get Server Errors

Asked 2 years ago, Updated 2 years ago, 45 views

[Situation]
From around last week, the script that was available until now suddenly disappeared when I opened the spreadsheet.
[Error Contents]
When I opened the script editor and asked them to run the target script, they said, "A server error has occurred.Please try again in a few moments.
[Script Purpose]
This is a script that uses the questionnaire function on a per-office basis and writes stamping information to a spreadsheet, but copies formulas as a subsequent process.
Script Contents

function onOpen(e){

    vararr = [
        {name:"Copy Formula", functionName:"copy"}

    ];
    var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
   spreadsheet.addMenu("Administrator Menu",arr);
}

function copy() {
  varobjSpreadsheet=SpreadsheetApp.getActiveSpreadsheet(); 
  varsheet=objSpreadsheet.getSheetByName("Original data for editing)");
  rangeToCopy=sheet.getRange('F2:S2');
  targetToCopy=sheet.getRange('F3:S');
  rangeToCopy.copyTo(targetToCopy);
}

The script was not written by myself, but taken over from my predecessor, and I have no experience in scripting, so I have not been able to investigate the cause.
Thank you for your cooperation.

google-apps-script

2022-09-30 14:18

1 Answers

From Comments

I added a new project to the existing spret and copied the code to it, and it worked.I guess the new project is under my authority. I was able to deal with it without any problems.Thank you very much。 – user13569December 10, 2015 1:58


2022-09-30 14:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.