// Create a new workbook Workbook workbook = new Workbook(); //Change the path to the real file path when open. XlsxOpenOptions options = new XlsxOpenOptions(); options.setPassword("123456"); workbook.open("source.xlsx", options);
// Create a new workbook var workbook = Workbook() //Change the path to the real file path when open. val options = XlsxOpenOptions() options.password = "123456" workbook.open("source.xlsx", options)