• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java processing Excel file issue with Date  RSS feed

Norman Meister
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

We have the following 2 similar excel files, available at Here


The first "File_with_Issue.xls" file we received from the supplier and when we process it as it is with our application, we get ArrayIndexOutOfBoundException.

The same file when we locally OPEN in Excel and SAVE it locally and then give to the application for processing, it processes the file well and without any issues.

The exception comes when the last Quarter Bis value 00:00:00 is processed.

In case of first file, we get the application output value as "12:00" against the 00:00:00, whereas, in-case of locally saved file, we get the returned value as "0:00" from the application.

We have a condition in the code to read the positions. In case of "File_Without_Issue.xls" the condition is true and the loop execution is stopped. But in case of "File_with_Issue.xls", even after reaching the last quarter, the logic will try to fetch the values from an index outside of range. So, the application throws ArrayIndexOutOfBoundException.

In my opinion, the problem probably is due to different excel version used to prepare/save the file?

I have MS Excel 2010, but when i saved as from the original file "File_with_Issue.xls", the default file type used was Excel 97-2003 Workbook. And then the new file "File_Without_Issue.xls" got processed correctly.

Also point to note is the file size. The original file size is: 143 kb, whereas the newly generated file size is 189 kb.

Can someone give any pointers as to what could be the actual problem?

It does not make sense due to obvious reason to first locally save the file using local excel version and then have it processed. The original file should be processed directly.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!