saveAsSpreadsheet method

This method saves the spreadsheet with a new name or format.

Defined in

Spreadsheet

Syntax

public void saveAsSpreadsheet(String fileName, String fileFormat) throws SymphonyException

Parameters

String fileName

Specifies the new name of the spreadsheet to be saved and must be the full file name containing the file path. For example, on Microsoft® Windows® , the format is D:\\test.ods . On Linux®, the format is /home/me/test.ods.

String fileFormat
Specifies the format of the spreadsheet to be saved. The following file formats are supported :
  • .ods file: Constant.SYMPHONY_FILE_FORMAT_ODS
  • .ots file: Constant.SYMPHONY_FILE_FORMAT_OTS
  • .xls file: Constant.SYMPHONY_FILE_FORMAT_XLS
  • .csv file: Constant.SYMPHONY_FILE_FORMAT_CSV

Usage

If the file path does not exist, this method throws an exception.

If the file format is not supported, this method throws an exception.

If the file already exists and the document is in visible mode, prompt asks if the existing file should be overwritten.

If the file already exists and the document is in invisible mode, this method overwrite the existing file.

See examples

Example: saveAsSpreadsheet method

Related information

File format constant