ความรู้เรื่องการใช้Google sheets.docx

โฟลเดอร์โครงการทะเบียนประวัติชาวอโศก
ประเภทไฟล์เอกสาร (application/vnd.openxmlformats-officedocument.wordprocessingml.document)
ขนาดไฟล์8.06 KB
วันที่แก้ไข18 พฤษภาคม 2561

เนื้อหาในไฟล์

วิธีแก้ไขข้อมูล ใน google form https://www.youtube.com/watch?v=_ewPs2-APjM

code แก้ไข ข้อมูลใน Google from

function assignEditUrls () { var form = FormApp . openById ( 'https://docs.google.com/forms/d/1cLGsrIo-GC32OYwMd_p-Aci7cx7nDgsYkMXDxKMwNEM/edit' ); //enter form ID here

var sheet = SpreadsheetApp . getActiveSpreadsheet (). getSheetByName ( ' การตอบแบบฟอร์ม 1 ' );

//Change the sheet name as appropriate var data = sheet . getDataRange (). getValues (); var urlCol = 4 ; // column number where URL's should be populated; A = 1, B = 2 etc var responses = form . getResponses (); var timestamps = [], urls = [], resultUrls = [];

for ( var i = 0 ; i < responses . length ; i ++) { timestamps . push ( responses [ i ]. getTimestamp (). setMilliseconds ( 0 )); urls . push ( responses [ i ]. getEditResponseUrl ()); } for ( var j = 1 ; j < data . length ; j ++) {

resultUrls . push ([ data [ j ][ 0 ]? urls [ timestamps . indexOf ( data [ j ][ 0 ]. setMilliseconds ( 0 ))]: '' ]); } sheet . getRange ( 2 , urlCol , resultUrls . length ). setValues ( resultUrls ); }

ไฟล์อื่นในโฟลเดอร์เดียวกัน