LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare data on excel

Solved!
Go to solution
I am using labview 7.1 and i having problems to compare data on two excel spreadsheet with about 30+ data and also having problems saving the data on the same spreadsheet. Like after comparing i would like to addition of value on the next column to _result.xls. Below is attached vi. Hope someone give me some ideas how to do that.
Download All
0 Kudos
Message 1 of 23
(4,078 Views)

Hi ,

 

 

I could not able to open up your code.sub vi's are missing.

Can u make it as llb and upload it.

 

 

Rgds,

Venky

0 Kudos
Message 2 of 23
(4,075 Views)
Ok...i upload as below. I having error on carry out the program. I not sure whether because of my subvi
0 Kudos
Message 3 of 23
(4,072 Views)

Hi ander99,

 

You mentioned that you are having problem comparing 30+ datas from 2 Excel spreadsheet. Do you mean 2 different Excel file or 2 different Excel spreadsheet in 1 Excel file?

 

You did not explain what is the problem you have when comparing 30+ datas. Can you tell us more? If you have error, can you provide the error number and description?

 

If you encounter an error -2147417848, I would suggest that you reinstall your Microsoft Office. The open reference is unable to locate Excel reference.

 

You also mentioned that you want to write to a cell in _result.xls. You can do this by changing the property node 'Range>>Value 2' to write. Right click on it and choose 'Change to Write' or 'Change All to Write'. Wire a string control to 'Value 2'. This will allow you to write to a particular cell.

 

Regards

Lee

NI ASEAN AE

0 Kudos
Message 4 of 23
(4,026 Views)

Actually i want to compare two excel files with data. Use one column to compare and add the other column data to the other excel files. is like A2 compare with other excel A2 and if A2 is higher than the other excel A2 , B2 of the 1st excel file will add to B2 of the other excel file. It repeated to the end of the two files. I hope anyone will give me an idea how to actually do this.

0 Kudos
Message 5 of 23
(4,017 Views)
I miss out something. Each excel files have 4 sheets. Is like sheet1 compare with the other sheet1 and update on one of the sheet. The sheet contain 1st column with Freq. Is like one of the excel will scan thru the other excel file (1st column Freq)and add the 2nd column value to the other excel file if the condition is met.
0 Kudos
Message 6 of 23
(4,015 Views)

Hi ander99,

 

I do not understand the flow of your application. I do not know which Excel file/sheet/column/cell you want to compare. It would be good if you can post a flowchart of your application.

 

From your explanation, you need to know how to read and write to Excel file. In Addition.vi you posted earlier, you are able to read from an Excel file. You just need to modify the 'Range>>Value 2' property node to write to the Excel file. I have attached a picture below on how to modify your Addition.vi to write to an Excel file.

 

Regards

Lee

NI ASEAN AE

0 Kudos
Message 7 of 23
(4,012 Views)

Hi Lee,

 

Sorry about my explaination. Below is the attached picture.

0 Kudos
Message 8 of 23
(4,007 Views)

Hi ander99,

 

The way you are reading from your Excel files is correct. You need to have them in a loop so that you can read from many cells continuously. You can use For Loop and an array of string. In this array of string, you can input the cells number that you want to read from. This will allow you to read from many cells continuously.

 

I think it would be better if you can give us a call. This will allow us to clarify our doubts on your application.

 

Regards

Lee

NI ASEAN AE

0 Kudos
Message 9 of 23
(3,969 Views)
Who do i direct my problem to?
0 Kudos
Message 10 of 23
(3,949 Views)