我有一个运行良好的脚本,我上次尝试它时运行良好,尽管从那以后我向它添加了一些东西并使它成为一个多页表单。代码似乎收集数据,但似乎没有将其传输到谷歌表。自从上次这样工作以来,我没有更改过输入的名称。
Code.gs:
function doGet() {
return HtmlService
.createTemplateFromFile('jSignature')
.evaluate();
}
function saveImage(bytes, sign){
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('FormResponse');
var dateObj = Date.now();
var bytes = bytes.split(",")
var blob = Utilities.newBlob(Utilities.base64Decode(bytes[1]), 'image/png');
var fileName = blob.setName("Signature "+dateObj).getName();
var sigFolder = DriveApp.getFolderById("my folder"); //replace with your folder id
var url = sigFolder.createFile(blob).getId();
Logger.log(url)
var carrier = sign.carrier;
var address = sign.address;
var dname = sign.dname;
var dnum = sign.dnum;
var date = sign.date;
var time = sign.time;
var tractortruck = sign.tractortruck;
var odom = sign.odom;
var aircompressor = sign.aircompressor;
var airlines = sign.airlines;
var BeltsandHoses = sign.BeltsandHoses;
var Body = sign.Body;
var BrakeAccessories = sign.BrakeAccessories;
var BrakesParking = sign.BrakesParking;
var BrakesService = sign.BrakesService;
var Clutch = sign.Clutch;
var CouplingDevices = sign.CouplingDevices;
var DefrosterHeater = sign.DefrosterHeater;
var DriveLine = sign.DriveLine;
var Engine = sign.Engine;
var Exhaust = sign.Exhaust;
var FifthWheel = sign.FifthWheel;
var FluidLevels = sign.FluidLevels;
var FrameandAssembly = sign.FrameandAssembly;
var FrontAxle = sign.FrontAxle;
var FuelTanks = sign.FuelTanks;
var Horn = sign.Horn;
var Lights = sign.Lights;
var Mirrors = sign.Mirrors;
var Muffler = sign.Muffler;
var OilPressure = sign.OilPressure;
var Radiator = sign.Radiator;
var RearEnd = sign.RearEnd;
var Reflectors = sign.Reflectors;
var SafetyEquipment = sign.SafetyEquipment;
var Starter = sign.Starter;
var Steering = sign.Steering;
var SuspensionSystem = sign.SuspensionSystem;
var TireChains = sign.TireChains;
var Tires = sign.Tires;
}
月关宝盒
相关分类