insertColumn method

Future<bool> insertColumn(
  1. int column, {
  2. int count = 1,
  3. bool inheritFromBefore = false,
})

Inserts new columns to Worksheet.

column - index of a column to insert, columns start at index 1 (column A)

count - optional (defaults to 1), the number of columns to insert

inheritFromBefore - optional (defaults to false), if true, tells the API to give the new columns the same properties as the prior column, otherwise the new columns acquire the properties of those that follow them, cannot be true if inserting a column with index 1

Returns Future true in case of success.

Throws GSheetsException.

Implementation

Future<bool> insertColumn(
  int column, {
  int count = 1,
  bool inheritFromBefore = false,
}) async {
  checkIndex('column', column);
  final isInserted = await _insertDimension(
    dimenColumns,
    column,
    count,
    inheritFromBefore,
  );
  if (isInserted) {
    _columnCount = _columnCount + count;
  }
  return isInserted;
}