[]
This class inherits the XLSX open-option settings provided by XlsxOpenOptions, such as password, import flags, recalculation behavior, row auto-fit behavior, and digital-signature-only mode, and uses OpenFileFormat.Xlsm as the target format.
XlsmOpenOptions options = new XlsmOpenOptions();
String password = getWorkbookPassword();
options.setPassword(password);
workbook.open("path/to/workbook.xlsm", options);
getDigitalSignatureOnly, getDoNotAutoFitAfterOpened, getDoNotRecalculateAfterOpened, getImportFlags, getInvalidFormulaHandling, getPassword, setDigitalSignatureOnly, setDoNotAutoFitAfterOpened, setDoNotRecalculateAfterOpened, setImportFlags, setInvalidFormulaHandling, setPasswordgetFileFormat, setFileFormatXlsmOpenOptions object.This constructor creates an options object for opening an XLSM workbook and sets the file format to OpenFileFormat.Xlsm.
XlsmOpenOptions options = new XlsmOpenOptions();
String password = getWorkbookPassword();
options.setPassword(password);
workbook.open("path/to/workbook.xlsm", options);