unmerge method
void
unmerge()
Separates merged cells into individual cells.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.worksheets[0];
Range range1 = sheet.getRangeByName('A1:D4');
//Merging cells
range1.unmerge();
List<int> bytes = workbook.saveAsStream();
File('Unmerge.xlsx').writeAsBytes(bytes);
workbook.dispose();
Implementation
void unmerge() {
if (isSingleRange) {
return;
} else {
final Range range = worksheet.getRangeByIndex(row, column);
range.rowSpan = 0;
range.columnSpan = 0;
}
}