function auto_data_entry() {
var wrkbk = SpreadsheetApp.getActiveSpreadsheet();
var wrkSht = wrkbk.getSheetByName("Data");
var formURL = "";
var formData ="";
var pname ="";
var email ="";
var date ="";
var grade ="";
var thick ="";
var width ="";
var length ="";
var finish ="";
var quality ="";
var quantity="";
var noofRows = 8;
for (i=2;i<=noofRows;i++)
{
pname = wrkSht.getRange("B"+ i).getDisplayValue();
email = wrkSht.getRange("C"+ i).getDisplayValue();
date = wrkSht.getRange("D"+ i).getDisplayValue();
grade =wrkSht.getRange("E"+ i).getDisplayValue();
thick =wrkSht.getRange("F"+ i).getDisplayValue();
width =wrkSht.getRange("G"+ i).getDisplayValue();
length =wrkSht.getRange("H"+ i).getDisplayValue();
finish = wrkSht.getRange("I"+ i).getDisplayValue();
quality =wrkSht.getRange("J"+ i).getDisplayValue();
quantity =wrkSht.getRange("K"+ i).getDisplayValue();
formURL ="https://docs.google.com/forms/d/1_WDcLw2Vkpt6ytssgXXCg9hOmkWn6dYTdKwqPoimUR8/formResponse?&pageHistory=0"
formData ="&entry.1193833205="+ pname +"&entry.2029914845="+ email +"&entry.849274780="+ date +"&entry.1316665848="+ grade +"&entry.1591447342="+ thick +"&entry.1210651108=" + width +"&entry.298422027="+ length +"&entry.907108031="+ finish +"&entry.1889070012="+ quality +"&entry.1833166722=" + quantity
var finalURL = formURL + formData
var options =
{"method" : "post"
};
UrlFetchApp.fetch(finalURL , options);
}
}
Попытка получить Automati c Данные из таблицы Google в ответ формы Google.
Совместное использование URL-адреса Google Form: - "https://docs.google.com/forms/d/1_WDcLw2Vkpt6ytssgXXCg9hOmkWn6dYTdKwqPoimUR8/edit#responses"
URL таблицы Google: - https://docs.google.com/spreadsheets/d/1GTO8KhKYLSFssovSWwm3y9ByuVhazz4FImh8uq7UDsA/edit?usp=sharing