逐行调整Google电子表格

时间:2017-05-24 02:08:59

标签: javascript google-sheets

我当前的电子表格有1个冻结行作为标题。我试图弄清楚如何调整,切片,移动等1.到目前为止我能够输出

[17-05-23 22:00:38:744 EDT] A6
[17-05-23 22:00:38:744 EDT] A5
[17-05-23 22:00:38:745 EDT] A4
[17-05-23 22:00:38:745 EDT] A3
[17-05-23 22:00:38:746 EDT] A2
[17-05-23 22:00:38:746 EDT] A1

第A1行是标题,需要跳过。

以下是我对代码的看法。

function steamData() 
{
  var values = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
  //values[i][y] y is index of the column starting from 0
  //values[y][i] y is index of the row starting from 0
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheets()[0];
  var vLength = values.length.toString().slice(0);
  for( i = sheet.getLastRow(); i > 0; i--) 
  {
    Logger.log("A"+ i);
    }
    }

1 个答案:

答案 0 :(得分:0)

我现在感到完全愚蠢。我只是继续循环迭代......

if (i === 1) { continue; }