LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare two text files for matching data

HI
 
I want to compare data in two separate spreadsheet files and store the matching data in another spreadsheet file.
 
like
 
1)reading data from two spread sheets
2)compare the data of fist one with second
3)writing the matched data to third one.
 
I am find difficulty in combining them to sort string bu string
pls help me in this
 
thanks
 
jyohti
0 Kudos
Message 1 of 9
(5,283 Views)
You're going to need to provide more information before anybody can provide specific help, such as:

  • Are these actual spreadsheets, as in Excel spreadsheets, or are these text files in which the information is tab-delimited?
  • What are you using to read the files?
  • Is the data 1D or 2D?
  • Are you comparing numbers or strings or both?
  • What are you trying to use to compare?
  • What are you using to write the result file?
The best things to do is to provide a sample of what you're doing and a detailed explanation of what you're trying to accomplish. In other words, help us to help you.
Message 2 of 9
(5,273 Views)

hi

the spread sheet are like normal excel sheets .

my basic requirement is like comparing two text documents and storing the match data in a new file.

so i started like converting a text document to an array by using 'spread sheet to array' and compare each elements of one array to another array .

but not able to do that

so i asked for help

 

 

 

 

 

0 Kudos
Message 3 of 9
(5,254 Views)
Well, you still haven't provided any detailed information, so the only thing I can suggest at this point without seeing the text files or the code you've already done is to suggest using the "Read From Spreadsheet File" VI that's in the File I/O palette. That reads a text file that is formatted like a spreadsheet into a 2D array of numbers. If you're using LabVIEW 8.2 you can set the datatype to read by clicking on the little box right below the icon of the VI and select what datatype to read. If your data is mixed (i.e., strings and numbers) use "String". If you're using an earlier version of LabVIEW you will need to make a copy of it and modify the VI to replace the 2D array of numbers that it outputs with a 2D array of strings. This modification is quite simple.

Start with this.
Message 4 of 9
(5,249 Views)

kindly go through this attach file

you will get an idea.

 

thanks

0 Kudos
Message 5 of 9
(5,240 Views)
Gannon University homework assigment? Please post any code that you have attempted thus far.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 6 of 9
(5,237 Views)
hi
 
i am implementing the following logic
 
1)  textfile1--------->string to array
                               
2)textfile 2--------->string to array
 
3) compare the elements (substring) of one array to other using for loop
 
4)append the match to an array every time you find a match betwwen two arrays
 
5)wriitng the result in new file
 
i am strugulling in with 3) i have finshed 1,2,4and 5 th part
 
problelms are with indexing and loop conditions for me...
 
anyways i am trying and feeling like i will finish and post that soon....
 
 
 
0 Kudos
Message 7 of 9
(5,222 Views)

Hi jyohti,

 

I am stuck with the same problem. I have multiple columns and rows on both text files. I will be using one column (name) from text file 1 to check if there is a similar name in text file 2 and output the entire row to another array. Could I request your program as it will help me get an idea of how to start.

 

I appreciate your kind assistance in the matter.

 

regards

kart

0 Kudos
Message 8 of 9
(4,802 Views)
Reposted here.
0 Kudos
Message 9 of 9
(4,796 Views)