function doGet() { const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); const data = sheet.getDataRange().getValues(); const headers = data[0]; const rows = data.slice(1); const json = rows.map(row => { let obj = {}; headers.forEach((header, i) => { let value = row[i]; // 날짜 데이터 처리 if (value instanceof Date) { value = Utilities.formatDate(value, "GMT+9", "yyyy. MM. dd. HH:mm"); } obj[header] = value; }); return obj; }); return ContentService.createTextOutput(JSON.stringify(json)) .setMimeType(ContentService.MimeType.JSON); }