Hallo,
ich habe Dir mal ein paar grundlegende Funktionen herraus gesucht
function myFunction() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var values = rows.getValues();
sheet.appendRow(['Cotton Sweatshirt XL', 'css004']);
var Range =
SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Tabellenblatt1").getRange("K1");
Range.setValue("Olaf");
}
function demoWriteFromArray() {
var employees=[["Adam"],["Barb"],["Chris"]];
ssActive = SpreadsheetApp.getActiveSheet();
rgMyRange = ssActive.getRange("K1:M1");
rgMyRange.setValue(employees)
}
/**
* Show the title and date for the first page of posts on the Google Apps
* Developer blog.
*
* @return Two columns of data representing posts on the Google Apps
* Developer blog.
* @customfunction
*/
function getBlogPosts() {
var array = [];
var url = 'http://googleappsdeveloper.blogspot.com/atom.xml';
var xml = UrlFetchApp.fetch(url).getContentText();
var document = XmlService.parse(xml);
var root = document.getRootElement();
var atom = XmlService.getNamespace('http://www.w3.org/2005/Atom');
var entries = document.getRootElement().getChildren('entry', atom);
for (var i = 0; i < entries.length; i++) {
var title = entries[i].getChild('title', atom).getText();
var date = entries[i].getChild('published', atom).getValue();
array.push([title, date]);
}
return array;
}
LG
Olaf
2016-01-21 21:53 GMT+01:00 Olaf Stolle <[email protected]>:
> Hi, you can via Tools Script
> Write your own function to open the table and then
> call the function on a day trigger.
>
> Grüße
>
> olaf
>
> 2016-01-21 20:17 GMT+01:00 Grant Kaye <[email protected]>:
>
>> Olaf -
>>
>> Danke schön! I'm afraid that's the limit of my German...
>>
>> How would I go about setting this up to run on it's own, say every night
>> at midnight?
>>
>> Grant
>>
>> ****************************************
>> Grant Kaye Photographyhttp://grantkaye.com
>> Truckee, California
>> (530) 386-6492
>>
>>
>> On Thu, Jan 21, 2016 at 10:43 AM, Olaf Stolle <[email protected]>
>> wrote:
>>
>>> Hallo,
>>>
>>> meinst Du so
>>>
>>>
>>> https://docs.google.com/spreadsheets/d/1IkAM5Clg1HINrTLgJnHxEugGqoRgmDkCB6qrlbt974U/edit?usp=sharing
>>> http://mesowest.utah.edu/cgi-bin/droman/meso_table_mesowest.cgi?stn=PACV
>>> =IMPORTHTML(C12; "table"; 0)
>>>
>>>
>>> LG
>>>
>>> Olaf
>>>
>>>
>>> 2016-01-21 16:33 GMT+01:00 Grant Kaye <[email protected]>:
>>>
>>>> Greetings everyone -
>>>>
>>>> I work at a skiing operation in the US, and they have asked me to set
>>>> up a Google sheet that contains rows of daily weather observations (such as
>>>> temperature, dewpoint, wind direction and speed, barometric pressure, etc.
>>>> at several weather stations across the state on a daily basis for the rest
>>>> of this winter.
>>>>
>>>> I have built the spreadsheet, but copying and pasting on a daily basis
>>>> is tedious.
>>>>
>>>> Is it possible to write a script or program within Google Sheets that
>>>> can go to a suite of websites on a timed, regular basis, read the HTML,
>>>> scrape the values out of the table, and deposit them into a Google Sheet?
>>>>
>>>> I did some research into DataMiner extension for Chrome, and while
>>>> paying them to write a recipe would work, except they do not offer
>>>> automation so it wouldn't be much different than cutting and pasting.
>>>>
>>>> I should say that I am not a computer programmer, but I have dabbled in
>>>> C+ and PHP for Arduino programming and website customization, so I am
>>>> somewhat familiar with very basic level coding, and I'm willing to learn
>>>> what I need to complete this project.
>>>>
>>>> Here are a few of the weather sites I need to gather data from:
>>>>
>>>> http://mesowest.utah.edu/cgi-bin/droman/meso_base.cgi?stn=EYKA2&time=GMT
>>>> http://mesowest.utah.edu/cgi-bin/droman/meso_table_mesowest.cgi?stn=PACV
>>>>
>>>> http://mesowest.utah.edu/cgi-bin/droman/meso_table_mesowest.cgi?stn=RHRA2
>>>>
>>>> http://wcc.sc.egov.usda.gov/reportGenerator/view/customSingleStationReport/daily/1055:ak:SNTL/CurrentWY,0/WTEQ::value,SNWD::value,PREC::value,TOBS::value,TMAX::value,TMIN::value,TAVG::value
>>>>
>>>> Thanks in advance for any direction/advice.
>>>> Grant
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google Spreadsheets API" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Google Spreadsheets API" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/google-spreadsheets-api/274D-UyD-VM/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Spreadsheets API" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.