0
私は使用しているIMPORTXML用にGoogleシートアプリスクリプトを取得しようとしています。自動更新機能付きGoogle AppsスクリプトへのIMPORTXML
A1
=importxml("http://www.nfl.com/liveupdate/scorestrip/ss.xml","//@q")
A2
=importxml("http://www.nfl.com/liveupdate/scorestrip/ss.xml","//@h")
データは、私はそれを自動更新を持っているウェブ上で発見スクリプトによるA1:B16
から塗りつぶし:私は私が入れすることになってるのか分からない
function getData() {
var queryString = Math.random();
var cellFunction1 = '=IMPORTXML("' + SpreadsheetApp.getActiveSheet().getRange('A1').getValue() + '?' + queryString + '","'+ SpreadsheetApp.getActiveSheet().getRange('A2').getValue() + '")';
SpreadsheetApp.getActiveSheet().getRange('C1').setValue(cellFunction1);
var cellFunction2 = '=IMPORTXML("' + SpreadsheetApp.getActiveSheet().getRange('A4').getValue() + '?' + queryString + '","'+ SpreadsheetApp.getActiveSheet().getRange('A5').getValue() + '")';
SpreadsheetApp.getActiveSheet().getRange('C2').setValue(cellFunction2);
}
/そのコードを私のものに置き換える。誰かが私が私のシートの中で働かせるために変えるべきものを説明するのを助けることができれば/それがどのように見えるかといういくつかの例を提供することは巨大な助けになるでしょう。
私はあなたがtime-driven trigger機能で、その後getFormula()
setFormula()
を使用して機能を更新することができ
[IMPORTXML()スプレッドシートの定期的な更新]機能の可能な複製](https://stackoverflow.com/questions/33872967/periodically-refresh-importxml-spreadsheet-function) –