Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
346 views
in Technique[技术] by (71.8m points)

How to open a URL in google apps script?

[https://docs.google.com/spreadsheets/d/1owEwaLhddXvSfI11AA7ZWmuQh4oeKoVSZkiu9LSlRLU/edit?usp=sharing ]

This is my sheet in which i fill the start time for first row manually. I open the link manually for the first time and mark my judgement for "Purchasable" Column as Y/N. As soon as i mark my judgement i want the "end time" column to fill automatically and the link in the "URL" column of the next row to open up automatically and repeat the same series. Is it possible by app script as I need to perform this task on google spreadsheet.

if(r.getColumn()==4){
var endCell=r.offset(0,4);
if(endCell.getValue()==='')
var date=Utilities.formatDate(new Date(),timezone,timestamp_format);
endCell.setValue(date);
var startCell=r.offset(1,-1);
startCell.setValue(date);

Now this could fill up the start and end time for a sample when i fill up the purchasable Column but I cant figure out how to open the next URL without clicking on it ??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have non-coding solution to this problem that only takes a couple of clicks.

In this sheet I have put on the end time column the formula =now(). When you change the yes or no column the end time column will update automatically. All you need to do is click on the timestamp for that row press ctrl+c to copy and ctrl+shift+v to paste. This will paste just the time without the formula making the timestamp permanent.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...