I have two excel files and i have to compare two columns in the both the excel files and get the matching data from the first sheet. I am able to compare the two sheets and get the common data. I have the exact row numbers which are common in both the excel files.
Can someone help me as to how I can pick the exact rows from the excel sheet using POI. I will be passing the row number and need to retreive the whole row and copy in a new sheet.
I don't think there's anything in the POI API to do exactly this. You'll have to iterate through the rows and cells of the sheet one by one and perform the comparison in code of your own.
Joined: Dec 07, 2005
I have done the comparision using normal java code. I just need to know as to how I can copy a particular row from one sheet to another. As I have the matching rows, i just need to copy the rows to a new sheet.
Joined: Mar 22, 2005
I don't think there's an API method for that, either. You'd need to do that one by one as well.