var id="1mTiLanColGPW6QTVPYsCStp5B_xkEx44Yb8VbaYrgQo"; ex = SpreadsheetApp.openById(id); var sheet = ex.getSheetByName("data"); var v=sheet.getRange(1,1,40,6).getValues(); var doc = DocumentApp.create("メモ"); for(s=1;s<41;s++){ for(sx=1;sx<6;sx++){ str="r["+s+"]["+sx+"]="+v[s-1][sx]+";" doc.appendParagraph(str); } } doc.saveAndClose(); }