There are Assessment for Excel Solutions in Java to do this. I used the jexcelapi which enables us to achieve this.