// Create a new workbook Workbook workbook = new Workbook(); // Open an excel file. InputStream fileStream = this.getResourceStream("xlsx\\AgingReport.xlsx"); // Get the possible import names in the file. // The names[0] and names[1] are sheet names: "Aging Report", "Invoices". // The names[2] and names[3] are table names: "'Aging Report'!tblAging", "Invoices!tblInvoices". String[] names = Workbook.getNames(fileStream); // The InputStream of the Java platform cannot be read repeatedly, so you need to create another one. InputStream fileStream2 = this.getResourceStream("xlsx\\AgingReport.xlsx"); // Import the data of a table "'Aging Report'!tblAging" from the fileStream. Object[][] data = Workbook.importData(fileStream2, names[2]); // Assign the data to current workbook. workbook.getWorksheets().get(0).getRange(0, 0, data.length, data[0].length).setValue(data); // Save to an excel file workbook.save("ImportDataForTable.xlsx");