Example: Next property

This example gets the first sheet, and displays the name of its next sheet.

  Sheets sheets = spreadsheet.getSheets();
  Sheet sheet = sheets.item(1);
  Sheet nextSheet = sheet.next();
  System.out.println(nextSheet.getName());

Related information

Next property