insertColumn method

Future<bool> insertColumn(
  1. int column,
  2. List values, {
  3. int fromRow = 1,
})

Updates column values with values.

Expands current sheet's size if inserting range is out of sheet's bounds.

values - values to insert (not null nor empty)

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

fromRow - optional (defaults to 1), row index for the first inserted value of values, rows start at index 1

Returns Future true in case of success.

Throws GSheetsException.

Implementation

Future<bool> insertColumn(
  int column,
  List<dynamic> values, {
  int fromRow = 1,
}) async {
  checkIndex('column', column);
  checkIndex('fromRow', fromRow);
  checkValues(values);
  return _ws._update(
    values: values,
    range: await _ws._columnRange(column, fromRow, values.length),
    majorDimension: dimenColumns,
  );
}