[]
CsvOpenOptions, SjsOpenOptions, XlsxOpenOptionsThis abstract class defines the common contract for option objects passed to workbook open APIs. Concrete subclasses represent format-specific settings for opening different workbook sources, such as CSV, XLSX, XLSM, XLTX, or SpreadJS .sjs content.
Each subclass assigns its associated OpenFileFormat through setFileFormat(OpenFileFormat) and can expose additional settings for its target format. Use getFileFormat() to inspect the format associated with a concrete options instance.
final OpenFileFormatprotected final voidsetFileFormat(OpenFileFormat value) This value identifies the workbook format associated with the current options instance, such as OpenFileFormat.Csv for CsvOpenOptions or OpenFileFormat.Sjs for SjsOpenOptions.
CsvOpenOptions options = new CsvOpenOptions();
OpenFileFormat fileFormat = options.getFileFormat();
workbook.open("path/to/data.csv", options);
This method updates the OpenFileFormat value returned by getFileFormat(). It is intended for use by derived option classes that need to identify the workbook format to open, such as CSV, XLSX, XLSM, XLTX, or SJS.
class CustomOpenOptions extends OpenOptionsBase {
CustomOpenOptions() {
setFileFormat(OpenFileFormat.Sjs);
}
}
CustomOpenOptions options = new CustomOpenOptions();
value - The file format to use for these open options. Must not be null.