Guys,

I have an Apache POI workbook and I would like to write that workbook to
the Camel Exchange. How could I do that?

        // Outputting to Excel spreadsheet
        FileOutputStream output = null;
        try {
            output = new FileOutputStream(new File(FILE_NAME +
FILE_TYPE_XLS));
            exch.getIn().setBody(output); // Actually I would like to do
exch.getIn().setBody(wb.write(output))
            wb.write(output);
            output.flush();
            output.close();
        } catch (FileNotFoundException e1) {
            throw e1;
        } catch (IOException e) {
            throw e;
        }

Regards,
Jothi

Reply via email to