我想知道是否可以将谷歌表中的单元格值导入网站? 谢谢大家的帮助!
答案 0 :(得分:0)
可能有几种方法可以做到这一点。我会将HTTP请求发送到返回单元格值的独立应用程序脚本内容服务脚本。在Apps脚本中编写程序:
doGet()
函数: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);
};
我不知道您是打算使用服务器端代码,JavaScript AJAX请求,还是网站用于服务器端代码的内容。