// 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);