Example: offset method

This example adds 2 columns and 4 rows to the range

  Range range = sheet.range("A1:E6");
  Range offsetRange = range.offset(4, 2);

This example reduces 1 columns and adds 3 rows to the range

  Range range = sheet.range("A1:E6");
  Range offsetRange = range.offset(3, -1);

Related information

offset method