0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

spreadsheetとAppsScriptでスケジュール表作成

Last updated at Posted at 2022-05-20

!スクリーンショット (5).png

AppsScriptのコード
function myFunction() {
 let spreadSheetByActive = SpreadsheetApp.getActive()
 
 let range = spreadSheetByActive.getSheetByName("sheet1").getRange("H2:I2")
 let date = spreadSheetByActive.getSheetByName("sheet1").getRange("D2")
 let data_holder = spreadSheetByActive.getSheetByName("sheet3").getRange("D1")
 let values = range.getValues()
 let dates = date.getValues()
 let count = data_holder.getValues()

 spreadSheetByActive.getSheetByName("sheet3").getRange(count,2,1,2).setValues(values)
 spreadSheetByActive.getSheetByName("sheet3").getRange(count,1).setValues(dates)
 spreadSheetByActive.getSheetByName("sheet3").getRange("D1").setValues([[++count]])

 let sh = spreadSheetByActive.getSheetByName("sheet1").getRange("C6:L24");
 sh.clearContent();
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?