addressGlobal property

String addressGlobal

Gets the Range reference along with its sheet name in format "'Sheet1'!$A$1". Read-only.

Workbook workbook = new Workbook();
Worksheet sheet = workbook.worksheets[0];
Range range = sheet.getRangeByName('A1');
String address = range.addressGlobal;
List<int> bytes = workbook.saveAsStream();
File('AddressGlobal.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

String get addressGlobal {
  final String result = '${worksheet.name}!';
  final String cell0 = r'$' + _getCellNameWithSymbol(row, column);

  if (isSingleRange) {
    return result + cell0;
  } else {
    final String cell1 = r'$' + _getCellNameWithSymbol(lastRow, lastColumn);
    return '$result$cell0:$cell1';
  }
}