From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

save data continously in a excel sheet

I am trying to read four voltage signals and write them into a MS excel sheet. When I tried this I got only the last set of data. For an example when I run the vi for few minutes just 6 numbers of readings were there. How can I write the data during entire data acquisition period? Thank you in advance.

amaka

0 Kudos
Message 1 of 8
(4,049 Views)
Hi Amaka,
How are you writing the data? Are you making sure that you are appending to your file instead of overwriting the results?
It might clarify the question if you could post your VI to show how you are accomplishing this operation.
Thanks!

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 8
(4,041 Views)

Hi Yi,

I have herewith attached a sample vi. This is the kind I want. Problem of this one is that in every cycle it asks a new file name. I wan to write the signal data continuously until the program stops. What modification should I do for that?

Thank you very much.

amaka

0 Kudos
Message 3 of 8
(4,034 Views)
Hi Amaka,
It appears that you are using Build File Path.vi which will prompt you for the root directory every time.  Here's the modified version that should give you what you need.
Hope this helps.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support

Message Edited by Yi Y on 08-03-2007 03:33 PM

Download All
Message 4 of 8
(4,023 Views)

Hi Yi,

Thank you very much. Now I got it.

I have one more question for you. Is there any way for me to read the specific cell of the excel sheet after the data is written. For an example if I want to read  A2 of the excel sheet how can I do that.

Thanks,

amaka

0 Kudos
Message 5 of 8
(4,011 Views)
Hi Amaka,
There's not a VI you can use to read a specific cell. 
The Read Spreadsheet VI that allows you to read from a certain offset, which would probably be your best bet if you know what was written into the spreadsheet to start out with.
You can also check out this image http://forums.ni.com/attachments/ni/170/95737/1/Excel_Read_Specific_Cells.gif. This utilizes ActiveX to read a specific cell from a spreadsheet.
Hope this information helps.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 6 of 8
(3,998 Views)

Hi Yi,

Thank you for the guidance. I tried to generate the activex but I am not sure how should I finally link this to my vi to input the information in the cell. The data type I want to read is numeric.

Thanks

Amaka

0 Kudos
Message 7 of 8
(3,995 Views)
Why don't you write to a CSV file?  This can be opened in excel and is much easier to program.  See the screenshot.
Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 8 of 8
(3,985 Views)