I have a requirement to transform xml data to a Excel file. I have the code that works fine when I write to a file, however, when I try to write to an Output Stream, the code is not working.
All I am trying to do was to create an excel file using Apache POI classes, and write to an Output Stream and pass it back to Oracle B2B, which would create an excel file in the SFTP server.
The below code works just fine, (Writing to a file, using FileOutPutStream)
FileOutputStream output1 =
new FileOutputStream(new File("C:\\Oracle\\Middleware\\home_11gR1\\user_projects\\domains\\mysoa_domain\\dsp\\PO_1234.xls"));
workbook.write(output1);
The below code does not work,
workbook.write((ByteArrayOutputStream)output);
I am not sure what would be the problem here. Any ideas and suggestions are greatly appreciated.