Example: closeSpreadsheet method

This example closes a spreadsheet without saving changes.

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

Related information

closeSpreadsheet method