LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save data (DBL array) in a excel file

Ok, I am new into Labview.  This question may seem easy for you guys, but for me, it is quite a challenge.  I have current coming out of a loop.  When the program stop, I would like to be able to save it as well as the time when it has been taking and the average current in a excel file.  When my labview code stops, how do I do to get a  pop up window which ask me where and what name to save it to? How do I get so that on the top of each column, it says : current (Amp)    Time (ms)   Average Current (amp)?
thank you very much,
0 Kudos
Message 1 of 7
(6,200 Views)
More info: it should ask to save it as an excel file by default
0 Kudos
Message 2 of 7
(6,192 Views)

Hi,

The easiest way is to write your data to a CSV file and read this file into Excel. I don't see this as a solution but more as a workaround. But it can work for you.

If you want to write the data directly into a Excel file you have to use a ActiveX interface. Recently I replied on a Excel question (Excel 97 with LabView 5.0) and posted a VI that reads data from Excel. Perhaps you can modify this yourself to do the things you want.

Give it a try and let me know if you need more help.

 

0 Kudos
Message 3 of 7
(6,170 Views)

Hello,

 

We love to see people catch the LabVIEW spirit and anything we can do to help you through the initial learning process is our pleasure.

As KC suggested saving the file as a .csv is a good idea, you can also save it as a txt file and open it with Excel specifying a delimiter for the columns.

There is a really good example you can find in the LabVIEW example finder if you search for the keyword ‘file’, the example is called “Write to Text File.vi”. They use a Get date/time String to record the time when data is acquired.

 

I have attached a simple Write to File picture of a VI that takes a random number and writes it to a file. When I run the VI, a popup asks me what I want to call the file. The first part writes the heathers on the columns and inside of the for loop I save the data. Underneath the block diagram is a picture of the output file when I specify the number of samples to be five.

If you want your file to be on a very specific format, you can create a template file, read it in LabVIEW, and then add your data to it and save it to a new file.

 

Hope this can get you started with your program.

There are a lot of good tutorials online on how to get started using LabVIEW. Here is the link to a three hour introduction course: http://zone.ni.com/devzone/learningcenter.nsf/03f7c60f17aad210862567a90054a26c/60c2782788a811c986256cd50001a0a6?OpenDocument&node=200067_us

We are also comming out with LabVIEW 8 in November and we have a program called LabVIEW Standard Service Program (SSP) that allows you to get automatic upgrades and updates. Please let me know if you are interested in knowing more about it.

Good luck,

Tica Taveras
Applications Engineer
National Instruments

0 Kudos
Message 4 of 7
(6,149 Views)

can you Pls Give The Programme,,,,,,,....here you only give the image...

0 Kudos
Message 5 of 7
(3,778 Views)

Hi ankitsharma,

                            You are asking to post VI of an image in a 7 year old thread.Better try to make a VI by your own after studying the image or start a new thread explaining your problem clearly.OK?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 6 of 7
(3,767 Views)

hi ankitsharma,

hope this helps, i just tried it out for one of my project today, so just thought it might help.

but if you can see, i did not apply the close function. But it still performs as mentioned by the creator 😉

 

Thanks alot Tica T, was a big help.

 

 

0 Kudos
Message 7 of 7
(3,698 Views)