link method
sheet2Object
will be linked with sheet1
.
If sheet1
does not exist then it will be automatically created.
Important Note: After linkage the operations performed on sheet1
, will also get performed on sheet2Object
and vica-versa
.
Implementation
void link(String sheet1, Sheet existingSheetObject) {
if (_sheetMap[existingSheetObject.sheetName] != null) {
_availSheet(sheet1);
_sheetMap[sheet1] = _sheetMap[existingSheetObject.sheetName]!;
if (_cellStyleReferenced[existingSheetObject.sheetName] != null) {
_cellStyleReferenced[sheet1] = Map<String, int>.from(
_cellStyleReferenced[existingSheetObject.sheetName]!);
}
}
}