使用App Script將Google表格資料新增至另一個Google表格的方法
P粉295728625
P粉295728625 2023-08-10 15:12:09
0
1
524
<p>將一個Google sheet中的資料複製到另一個sheet中,使用appscript</p> <p>我想使用appscript在另一個電子表格中顯示 我想使用appscript將行和列資料從一個sheet添加到另一個sheet。 </p><p> 以正確的方式回答,<code>your text</code>不要出錯。 </p>
P粉295728625
P粉295728625

全部回覆(1)
P粉388945432

將資料從一個電子表格複製到另一個電子表格

function copydata() {
  const ss = SpreadsheetApp.getActive();
  const ss1 = SpreadsheetApp.openById(gobj.globals.test1id);//替换为id
  const sh1 = ss1.getSheetByName("Sheet1");
  const vs1 = sh1.getDataRange().getValues()
  const ss2 = SpreadsheetApp.openById(gobj.globals.test2id);//替换为id
  const sh2 = ss2.getSheetByName("Sheet1");
  sh2.clearContents();
  sh2.getRange(1,1,vs1.length,vs1[0].length).setValues(vs1);
}
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!