Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 5th, 2009, 01:56 AM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Compare two excel sheets row wise

Hi i am new to this forum...i want to compare two excel sheets row wise..here i want to take one row from first excel sheet and compare with all rows in another excel sheet.if any of the row from first sheet completely matches with any of the rows in second excel sheet then it shoud give report like yes or matching with this row like that in any one of the excel sheet...can anyone help me in this

thanks in advance.....
Reply With Quote
  #2 (permalink)  
Old July 7th, 2009, 09:40 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am not aware of existing tools/code to do that. But if you are using apache POI and want to do it on your own, you can do like as follows
1. Extends HSSFRow class and override equals() method and implement your code to compare two rows. OR write a utility method in your existing class which take two HSSFRow object and compares two rows, returns true if they are equal else false.
2. Use HSSFSheet.rowIterator() to get the rows and loop through the rows of your document and call the equals() OR the utility method to compare

Hope it gives some start to solve your problem.
__________________
- Rakesh
http://iam-rakesh.blogspot.com
Reply With Quote
  #3 (permalink)  
Old July 7th, 2009, 10:06 AM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thank you for the response...will try in that way
Reply With Quote
  #4 (permalink)  
Old July 7th, 2009, 10:09 AM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

do i need any jar file for using poi
if in case i have to use where can i get that jar files?????


thanks in advance
Reply With Quote
  #5 (permalink)  
Old July 7th, 2009, 10:11 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

check this link

http://poi.apache.org/
__________________
- Rakesh
http://iam-rakesh.blogspot.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing two excel sheets nbkn8ct Excel VBA 5 August 28th, 2009 05:20 PM
Working with excel sheets ramsri VB How-To 1 October 25th, 2007 03:15 PM
Import From excel with n sheets dbellavi SQL Server DTS 1 September 11th, 2007 07:51 AM
compare values in one row to the next tholleran SQL Server 2000 7 March 22nd, 2007 04:45 PM



All times are GMT -4. The time now is 01:38 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.