環境:
GAS
qiita Practice.js
const this_spread = SpreadsheetApp.getActiveSpreadsheet();
function createMap() {
const criteria_sheet = this_spread.getSheetByName('criteria');
let name_map = new Map();
for(let count = 1; count <= 4; count ++){
let key = criteria_sheet.getRange(count,1).getValue();
let value = criteria_sheet.getRange(count,2).getValue();
name_map.set(key, value);
}
return name_map
}