allColumns method

Future<List<List<Cell>>> allColumns({
  1. int fromColumn = 1,
  2. int fromRow = 1,
  3. int length = -1,
  4. int count = -1,
})

Fetches all columns.

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

fromColumn - optional (defaults to 1), index of a first returned column (columns before fromColumn will be skipped), columns start at index 1 (column A)

fromRow - optional (defaults to 1), index of a row that columns start from (cells before fromRow will be skipped), rows start at index 1

length - optional (defaults to -1), the length of a requested columns if length is -1, all cells starting from fromRow will be returned

count - optional (defaults to -1), the number of requested columns if count is -1, all columns starting from fromColumn will be returned

Returns all columns as Future List of List.

Throws GSheetsException.

Implementation

Future<List<List<Cell>>> allColumns({
  int fromColumn = 1,
  int fromRow = 1,
  int length = -1,
  int count = -1,
}) async {
  final columns = await _ws.values.allColumns(
    fromColumn: fromColumn,
    fromRow: fromRow,
    length: length,
    count: count,
  );
  return List<List<Cell>>.generate(
    columns.length,
    (index) => _wrapColumn(columns[index], fromColumn + index, fromRow),
  );
}