I'm writing a Java program to fetch data from Excel sheet.
From the below program, i'm able to retrieve the entire data.
But here my case is there are nearly 45-47 columns and out of there there is some data which is not required(for me, but needed for some other teams). Every column has a heading, and out of these 45-47 columns i want to pull data only from 12 columns, and there are randomly placed between the rest of columns in Excel sheet.
And I need to retrieve only a set of column data from the Excel Sheet. I'm trying to do it with the below program.
I've initialized the columns from where i need to retrieve data in a string named colIndex.
I'm getting the below error
I'm using Apache POI.
please let me know how can i fix this.
posted 5 years ago
Got it. This is for reference, just in case someone gets the same problem.