selectRangeValuesWithString method

List<List?> selectRangeValuesWithString(
  1. String range
)

returns 2-D dynamic List of the sheet elements in that range.

Ex. selectRange('D8:H12'); or selectRange('D8');

Implementation

List<List<dynamic>?> selectRangeValuesWithString(String range) {
  List<List<dynamic>?> _selectedRange = <List<dynamic>?>[];
  if (!range.contains(':')) {
    var start = CellIndex.indexByString(range);
    _selectedRange = selectRangeValues(start);
  } else {
    var rangeVars = range.split(':');
    var start = CellIndex.indexByString(rangeVars[0]);
    var end = CellIndex.indexByString(rangeVars[1]);
    _selectedRange = selectRangeValues(start, end: end);
  }
  return _selectedRange;
}