create method

ExcelTable create(
  1. String tableName,
  2. Range range
)

Creates a table with specified name and data range.Adds it to the List Objects collection.

Implementation

ExcelTable create(String tableName, Range range) {
  final Workbook book = range.worksheet.workbook;
  range = _checkRange(range);
  _checkOverlap(range);
  final _ExcelTableImpl result =
      _ExcelTableImpl(tableName, range, _tableCollection.length + 1);
  result._name = _isNameExists(tableName);
  result.dataRange = range;
  result._index = ++book._maxTableIndex;
  _tableCollection.add(result);
  return result;
}