アットウィキロゴ

VH4

function myFunction() {
 
  var id="1hPzZlJVJIaCuOeojk_FY5H0_6fB71RRLMVpuhy2uy8o"; 
 ex = SpreadsheetApp.openById(id);
 var sheet = ex.getSheetByName("data");
 
  r=sheet.getRange("A1:D8");
 
 
 
  var chart = sheet.newChart()
              .addRange(r)
              .setPosition(1,4,0,0) //buildメソッドの前に、挿入場所を指定するsetPositionを加えます。
              .build();
  sheet.insertChart(chart);
 
 
}
 
最終更新:2017年03月31日 08:40