insertRowByKey method
Updates row by its name 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)
key
- name of a row to insert values
to
The column A considered to be row names
fromColumn
- optional (defaults to 2), column index for the first inserted
value of values
,
columns start at index 1 (column A)
eager
- optional (defaults to true
), whether to add key
if absent
Returns Future true
in case of success.
Throws GSheetsException.
Implementation
Future<bool> insertRowByKey(
Object key,
List<dynamic> values, {
int fromColumn = 2,
bool eager = true,
}) async {
final row = await rowIndexOf(key, add: eager);
if (row < 1) return false;
return insertRow(row, values, fromColumn: fromColumn);
}