From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read data from excel and add to another excel file without replacing

Hello Experts,

I need help to read from excel file.

I have two columns in excel file to be read and in the first coulmn there is name of parameter and in second the corresponding value.

And this file replaced after every 10 minutes with new data parameters.

What i am trying to do is to read the data from this file and export these parameters to excel in which the new parameters will be logged one after another.

I have serached forums but unable to get from where to start.

 

All the help will be highly appreciated.

 

 

Thanks

0 Kudos
Message 1 of 19
(4,570 Views)

Since Excel files are proprietary from Microsoft then reading and writing to and from excel requires you to use ActiveX or the Office toolkit from NI. If you are just starting out then I would not use this approach or if you must use Excel then save the files as a .csv instead of .xls that way you can just use the native LabVIEW read and write to spreadsheet files, however if you must use excel in the .xls format then you can search the forums on how to do that. I have wrote many example programs and even some toolkits.

 

For more information and some sample VI's and tool kits, you can go to the excel board




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 19
(4,559 Views)

Thanks for information.

Other than excel i have possibility for generating the ASCII file but the output file where i will be exporting data should be excel.

 

You did a great job in excel board.

 

thanks

 

0 Kudos
Message 3 of 19
(4,555 Views)

I have installed microsoft office toolkit and went through  vi´s in order to prepare what i am looking for !

But unable to start up with it. Since the data coming from instrument is not always in the same cell i need to find for specific name and then to read data

from the next cell. Attached can see the file with comments , ¨to be read¨ and the output file in which it will be appended.

 

 

All the ideas and examples are welcome and will be appreciated much in terms of maximum kudos i can .

Got completely stuck Help me out !

 

Download All
0 Kudos
Message 4 of 19
(4,539 Views)

Smiley Sad

 

No any clues about this !

 

0 Kudos
Message 5 of 19
(4,529 Views)

NO any experts available in forum ?

0 Kudos
Message 6 of 19
(4,509 Views)

Hi,

did you check the link Joe posted?

 

Mike

0 Kudos
Message 7 of 19
(4,503 Views)

Hello,

Thanks for reply. Indeed i have gone through maximum possibilities to solve this.

I could able to read data from file and it shows on the labview panel. So far i have reached this much (see the attached Vi and excel file ).

And can export data to excel to ASCII file readable by excel. But i am completely stuck since every export replaces the earlier data instead of writing to next row.

Since i am at very learning stage, i dont know how to deal with this.

 

Every information will be greatly appreciated.

 

Thanks

 

Download All
0 Kudos
Message 8 of 19
(4,499 Views)

Although the VI is very bulky. I tried build as much i can.

 

 

thanks

0 Kudos
Message 9 of 19
(4,496 Views)

The way that your VI is written I cannot make heads or tails out of what you are trying to accomplish. YOu have lots of Excel functions that do the same thing over and over again. In a flat sequence. You should just build a subvi with a input for the string to find. Also on your write to the csv file. you open the file, write to it and then close it. the reason why the data gets overwritten is because the open file path is set to replace or create and it should be set to open or create.




Joe.
"NOTHING IS EVER EASY"
Message 10 of 19
(4,487 Views)