简体   繁体   中英

Adding a row to a Google Spreadsheet using Javascript

I am trying to add a new row at the end of the table using three textboxes in HTML. So I'm assuming the best way to do it is by Javascript. I am new to Google Docs programming so I am going with what I find on Google even though there is not a lot of information out there.

So I have this table:

https://docs.google.com/spreadsheet/pub?key=0ApLU-4iFz9JYdGkzVlB2YWVDYXcweEYwcTFrRmJUYWc&output=html

I want to add values to the end of the table using txtfield1, txtfield2, and txtfield3 from an HTML.

So txtfield1.value = "K", txtfield2.value = "11", txtfield3.value = "24-Sep-2012" but I know how to get that. I just need to understand how a row, or each independent cell is modified in the Google Spreadsheet by using Javascript.

Is this complicated to achieve? I tried looking up tutorials to do this but I couldn't find anything so I'm not sure it's possible to do this.

The HTML Service is a good way to do this. The tutorial is here https://developers.google.com/apps-script/html_service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM