copy method

void copy(
  1. String fromSheet,
  2. String toSheet
)

Copies the content of fromSheet into toSheet.

In order to successfully copy: fromSheet should exist in excel.tables.keys.

If toSheet does not exist then it will be automatically created.

Implementation

void copy(String fromSheet, String toSheet) {
  _availSheet(toSheet);

  if (_sheetMap[fromSheet] != null) {
    this[toSheet] = this[fromSheet];
  }
  if (_cellStyleReferenced[fromSheet] != null) {
    _cellStyleReferenced[toSheet] =
        Map<String, int>.from(_cellStyleReferenced[fromSheet]!);
  }
}