I have wrote a java service that gets executed from an email port whenever a email comes with an xlsx attachment.
I am extracting the attachment from the mail in my java service and reading its content in a bufferedinput stream.
I am getting error while creating a workbook object for that attachment object.
Below is the code where i am getting error:
IDataCursor pipelineCursor = pipeline.getCursor();
Object inputStream = IDataUtil.get( pipelineCursor, “inputStream” );
BufferedInputStream bufferedInputStream = new BufferedInputStream( (InputStream) inputStream );
if (bufferedInputStream == null)
throw new ServiceException(“Input File Stream is Null”);
IData row_list = null;
String debugLog = null;
Workbook wb = null;
debugLog = “Workbook Object Creation”;
wb = new XSSFWorkbook(bufferedInputStream); // error at this step.
Sheet sheet = wb.getSheetAt(0);
The input to this java service is an object containing the xlsx attachment.
I am having following jars in my classpath:
Can anyone of you please help me to resolve this issue.?
Thanks in Advance…