function doGet() {
//This Apps Script is Used to get a cell value out of a spreadsheet
var theSpreadSheet = SpreadsheetApp.getFileById('Your File ID');
var theSheet = theSpreadsheet.getSheetByName('sheet name');
var theCell = theSheet.getRange("A1");
var theContent = theRange.getValue();
return ContentService.createTextOutput(theContent);
};
1 回答
可能有几种方法可以做到这一点 . 我会将HTTP请求发送到返回单元格值的独立应用程序脚本内容服务脚本 . 在Apps脚本中编写程序:
Apps Script Link
创建一个doGet()函数:
我不知道您是打算使用服务器端代码,还是JavaScript AJAX请求,或者您的网站用于服务器端代码 .