This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes compare csv data with table rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "compare csv data with table rows" Watch "compare csv data with table rows" New topic
Author

compare csv data with table rows

divya kundapur
Ranch Hand

Joined: Aug 21, 2007
Posts: 110
Hi,

I need to compare csv data with the table rows. I want to know how can i make it efficient.


SCJP - 5.0
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

The detail matters but you don't give any detail.

What do you require of the comparison? Just that they are equivalent or not? The difference between the two?
Does your table have the same number of rows as your CSV file?
Does your table have the same number of columns as your CSV file?
Are the columns in the table in the same order as the columns in the CSV file?
Are the rows in the table in the same order as the rows in the CSV file?
Are the values in the table all strings and if so how do you want them compared?
How do you want the result of the comparison presented?

There are bound to be more questions but these should be enough to be going on with.


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
For reading CSV files I'd use one of the libraries mentioned in http://www.coderanch.com/how-to/java/AccessingFileFormats; most likely faster than writing your own CSV reader.

What are "the table rows"? Part of a web page? Part of a desktop app? Something else?


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compare csv data with table rows
 
Similar Threads
Large Map / HashMap
insert CSV values from file to MySQL
help me Xsl in struts2?
Accessing database APIs (newbie)
CSV+truncate leading zero solution