insertColumn method

  1. @override
void insertColumn(
  1. String sheet,
  2. int columnIndex
)
override

Insert column in sheet at position columnIndex

Implementation

@override
void insertColumn(String sheet, int columnIndex) {
  super.insertColumn(sheet, columnIndex);

  var rows = _findRows(_sheets[sheet]!).toList();
  for (var row in rows) {
    var cell = _findCellByIndex(row, columnIndex);
    if (cell != null) {
      row.children.insert(row.children.indexOf(cell), _createCell(null));
    } else {
      row.children.add(_createCell(null));
    }
  }
}