code: public void write(File file) {
      FileOutputStream out = null;
      try {
        out = new FileOutputStream(file, false);
        workbook.write(out);
      } catch (FileNotFoundException e) {
        throw new RuntimeException(e);
      } catch (IOException e) {
        new RuntimeException(e);
      } finally {
        if (out != null)
          try {
            out.close();
          } catch (IOException e) {
            new RuntimeException(e);
          }
      }
    }
docs: Saves data to a new file.
  
  @param file the file to save the data into