[]
CsvSaveOptions, HtmlSaveOptions, PdfSaveOptions, SjsSaveOptions, XlsxSaveOptionsThis abstract class stores the target SaveFileFormat for a save operation and defines the common contract shared by format-specific save option types. Pass a concrete subclass to save APIs such as Workbook.save(String,SaveOptionsBase) or IWorksheet.save(String,SaveOptionsBase) to control how content is written for a particular output format.
Derived classes initialize the file format through setFileFormat(SaveFileFormat) and expose additional settings for their corresponding formats, such as CSV, HTML, PDF, SJS, or XLSX-based output. Use getFileFormat() to inspect the format associated with a concrete save options instance.
final SaveFileFormatprotected final voidsetFileFormat(SaveFileFormat value) This value identifies the SaveFileFormat used by the current save options instance. Concrete subclasses set this value to the format they support, such as SaveFileFormat.Csv for CsvSaveOptions or SaveFileFormat.Pdf for PdfSaveOptions.
PdfSaveOptions options = new PdfSaveOptions();
SaveFileFormat fileFormat = options.getFileFormat();
This protected method is used by SaveOptionsBase subclasses to define which SaveFileFormat the options instance represents. The assigned value is returned by getFileFormat().
class CustomSaveOptions extends SaveOptionsBase {
void usePdfFormat() {
setFileFormat(SaveFileFormat.Pdf);
}
}
CustomSaveOptions options = new CustomSaveOptions();
options.usePdfFormat();
value - The file format to associate with these save options; may be null.