Example: UniqueID property

This example displays the unique id of the spreadsheet.

try {
  Application application = Application.getInstance();
  Spreadsheets spreadsheets = application.getSpreadsheets();
  Spreadsheet spreadsheet = spreadsheets.openSpreadsheet("D:\\test.ods", true);
  System.out.println(spreadsheet.getUniqueID());
} catch(Exception e) {
  e.printStackTrace();
}

Related information

UniqueID property