// Create a new workbook Workbook workbook = new Workbook(); // Open the xlsx file that contains timeline slicer. workbook.open(this.getResourceStream("xlsx/TimelineSlicer.xlsx"), OpenFileFormat.Xlsx); // Save to an excel file workbook.save("TimelineSlicer.xlsx");