This repository was archived by the owner on Jul 29, 2022. It is now read-only.

Description
The export functionality is meant to be called by a button click from the UI, most of this code is based off of the snippets found here
export() produces no output, or at least I have found no way to identify where the output is, I've hacked around this for now with the code in the try/catch, which does indeed produce a file at the specified location
Any assistance would be very appreciated.
Button exportBt = new Button("Export", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
ExportToExcelUtility<Investment> exportUtility = customExport();
exportUtility.setSourceUI(UI.getCurrent());
exportUtility.setResultantExportType(ExportType.XLSX);
exportUtility.setExportWindow("_blank");
exportUtility.export();
//TODO: Find where this is going, verify contents
System.out.println(exportUtility.getExportExcelConfiguration().getExportFileName());
try {
File f = File.createTempFile("vaadin", ".xlsx", new File("C:\\Users\\test\\Documents\\Mako"));
FileOutputStream fos = new FileOutputStream(f);
exportUtility.getWorkbook().write(fos);
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
});