gasでファイル出力
function getOAuthToken() {
var authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);
return authInfo.getAccessToken();
}
function exportToJSFile() {
var sheet = SpreadsheetApp.getActiveSheet();
var data = sheet.getDataRange().getValues();
var fileName = "output.js";
var folderId = "XXXXXXXXXXXXXXXXXXXXX"; //出力先フォルダのIDを指定
var folder = DriveApp.getFolderById(folderId);
var file = folder.createFile(fileName, JSON.stringify(data), MimeType.JAVASCRIPT);
}