答案 0 :(得分:0)
我知道没有这样做的功能,但您可以使用相对简单的Google App脚本(/etc/resolv.conf)来完成此操作。此脚本将取消合并所有合并的单元格,并将空单元格替换为紧邻上方的单元格值。
function unmergeAndExpand() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getDataRange();
// unmerge all of the cells in the sheet
range.breakApart();
var data = range.getValues();
var width = range.getLastColumn();
// walk over your spreadsheet column by column
for(var column = 0; column < width; column++){
var last = "";
// walk down the rows
for(var row = 0; row < data.length; row++){
// if the current cell is empty and
if(last && ! data[row][column]){
sheet.getRange(row+1, column+1).setValue( last );
}
// store the value of the current cell
// so that we can fill the next cell, if it is empty
last = data[row][column];
}
}
}