Unmerge spreadsheet cells and fill ex-merged empty cells with data
问题 breakApart() works fine, but I'd like to fill the empty cells with merged cell's data. var sheet = SpreadsheetApp.getActiveSheet(); var sheetRange = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns()); sheetRange.breakApart(); I got the value I need, but how can I get the cells to fill? var value = (cell.isPartOfMerge() ? cell.getMergedRanges()[0].getCell(1,1) : cell).getValue(); 回答1: If you already have the value, You can setValue() the desired value over the entire range and all