I want to create an excel file from byte[]. and I'm using jxl library in spring boot.
I need a file with XLS format, convert to Base64 and return that.
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(20000000);
WritableWorkbook workbook = Workbook.createWorkbook(outputStream);
...
String resultBase64 = reportService.fetchReportExcel(...);
byte[] excel = base64.decode( resultBase64 );
I have many byte arrays and I need to write btye arrays in many sheets of an excel file too, if it's possible. thanks
I write it
my code: