Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ByteArrayOutputStream byos = new ByteArrayOutputStream();
- // on remplit le ByteArrayOutputStream
- workbook.write(byos);
- Path tempReportFile = Paths.get("report.xlsx");
- Path path = tempReportDir.resolve(tempReportFile);
- try (OutputStream outputStream = Files.newOutputStream(path)) {
- byos.writeTo(outputStream);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement