Javascript API谷歌表单引用错误

Javascript API谷歌表单引用错误,javascript,json,Javascript,Json,我对这一点还不熟悉,我正在学习一个教程,它告诉我第一课应该发布什么。我得到一个错误: “ReferenceError:“APIPullSheet”未定义(第8行,文件“代码”) 下面第8行是: “APIPullSheet.getRange('A2:D199').clearContent();” 代码如下: { // Link the script with a spreadsheet using the unique identifier found in the spreadsheet

我对这一点还不熟悉,我正在学习一个教程,它告诉我第一课应该发布什么。我得到一个错误:

“ReferenceError:“APIPullSheet”未定义(第8行,文件“代码”)

下面第8行是:

“APIPullSheet.getRange('A2:D199').clearContent();”

代码如下:

{
    // Link the script with a spreadsheet using the unique identifier found in the spreadsheet web address
    var ss = SpreadsheetApp.openById('1COPZmNRB3pd80fMbLXzi2vfTBKoDYb7rk3yCa2-cI4k');
    // Clear Columns A, B, C & D
    APIPullSheet.getRange('A2:D199').clearContent();

    // Pull the JSON data and parse it
    var url = "https://poloniex.com/public?command=returnOrderBook&currencyPair=BTC_XMR&depth=19999";

    var responseAPI = UrlFetchApp.fetch(url);
    var parcedData = JSON.parse(responseAPI.getContentText());
}

我的谷歌工作表是用正确的名称(APIPull)设置的,我的谷歌工作表标识符是正确的。非常感谢您的帮助。提前感谢。

请使用缩进来格式化有问题的代码,使其更易于阅读。以上是缩进的意思吗?