Created
February 25, 2019 13:50
-
-
Save noblejasper/3a3dcf90da637be06e460c25a00b513d to your computer and use it in GitHub Desktop.
Gmailの添付CSVファイルをスプレッドシートに自動で入れたい
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ss = SpreadsheetApp.openById("{スプレッドシートのID}"); | |
var sh = ss.setActiveSheet(getTargetSheet(ss.getSheets(), "{シートの名前}")); | |
function import() { | |
// 最新mailからCSVを取得 | |
var csv = getNewestCSVFromGmailAttachment(); | |
// シートをまっさらに | |
sh.clear(); | |
// シートに書き込み | |
sh.getRange(1, 1, csv.length, csv[0].length).setValues(csv); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment