Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 第一个谷歌脚本-在xls中保存数据并上传文件_Google Apps Script - Fatal编程技术网

Google apps script 第一个谷歌脚本-在xls中保存数据并上传文件

Google apps script 第一个谷歌脚本-在xls中保存数据并上传文件,google-apps-script,Google Apps Script,刚接触GAS,我正在努力完成我的第一个脚本。任何帮助都将不胜感激。 UI显示,但我无法在xls文件中写入数据。当我使用一个处理程序时,它正在工作,但是,我不得不将它更改为doPost以使文件上传工作 我想有一个UI,有几个字段和2个文件上传选项。有人有我可以开始使用的示例脚本吗 我的剧本 function doGet(e) Create a vertical panel with a grid that has text boxes Create a form that has a f

刚接触GAS,我正在努力完成我的第一个脚本。任何帮助都将不胜感激。 UI显示,但我无法在xls文件中写入数据。当我使用一个处理程序时,它正在工作,但是,我不得不将它更改为doPost以使文件上传工作

我想有一个UI,有几个字段和2个文件上传选项。有人有我可以开始使用的示例脚本吗

我的剧本

function doGet(e)  
 Create a vertical panel with a grid that has  text boxes
 Create a form that has a file upload box 


function doPost(e) { 
var doc = SpreadsheetApp.openById('0Auxvh5UNOiURdE1uc1VOVGNlTE01bjF4THRmdzFnSXc'); 
var lastRow = doc.getLastRow();
var cell = doc.getRange('a1').offset(lastRow, 0);
cell.setValue(e.parameter.universityname);
cell.offset(0, 1).setValue(e.parameter.eventname);to age 
cell.offset(0, 2).setValue(e.parameter.city);

var fileBlob = e.parameter.thefile;
var doc = DocsList.createFile(fileBlob);


 var app = UiApp.getActiveApplication(); 
 app.close(); 
 return app; 
}