LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to an Excel File

I am trying to make an excel spreadsheet given data from a pressure calibration. I need it to be able to ask the user for their name, probe number and range. It also needs to be able to put the date in by itself. Also, it needs to be able to ask for a number for what the pressure is and then when it reaches that number to put the voltage into the excel file. It needs to be able to collect only 10 data points. Then it needs to make a line graph with this information. How do i do so? An example file would help tremendously!!

0 Kudos
Message 1 of 28
(4,712 Views)

Help ---> Find Examples  ---> Communicating With External Applications ---> Active X ---> Excel

0 Kudos
Message 2 of 28
(4,687 Views)

You're asking for a lot of things there, so you need to break it down in pieces.

 

First off, does it absolutely have to be an Excel workbook? If so you will then need to either get the Report Generation Toolkit, or learn to use ActiveX to create Excel workbooks and write data to it. The Excel threadhas links to lots of examples on manipulating Excel. NOTE: DO NOT POST QUESTIONS IN THAT THREAD. If you do not absolutely need an Excel workbook then you can just use the Write to Spreadsheet File VI. This will create a delimited text file that you can read into Excel if you need to.

 

As for your other questions, it sound like you need to make up some dialog boxes. This is fairly easy, and examples ship with LabVIEW. There have also been numerous examples posted.

 

What's not clear is where this voltage is coming from. Is this something you're asking the user to enter, or are you reading this from some DAQ device.

 

Have you looked at some of the tutorials and examples? To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

0 Kudos
Message 3 of 28
(4,686 Views)

Everything is already set up my job is just to take the information that is given and make labview put it into an excel spreadsheet. I have the microsoft add on thing. I am very new with this program and this is my first time using it not doing tutorials.

0 Kudos
Message 4 of 28
(4,675 Views)

So have you attempted to write any code yet.  You would get help more readliy if you try to write some code, post it here, then ask for help on any problems you run into.

You can start by writing code to ask for the information you require.  Use a Prompt User function to prompt the user for information.  We'll go from there.

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 28
(4,667 Views)

Here is what I have so far. I just need to send what i finish to my supervisor and he will add the rest of it

0 Kudos
Message 6 of 28
(4,649 Views)

Hey Leprechaun,

 

Depending on what you need to do to the data afterwards it is quite easy to append data to a spreadsheet file by converting each data reading to a string and concatonating your information to the string before writing to a text file.

 

I would also recommend searching the examples for something you can use and if you have a function you need to implement, try right-clicking in the block diagram and entering what you want to do into the search.

 

To get users to enter information, using the 'prompt user for input' usually works quite well.

 

Regards

 

Chris

National Instruments - Tech Support
0 Kudos
Message 7 of 28
(4,639 Views)

I have attached a screenshot of a VI I wrote that'll write to a spreadsheet file. You can use it as a reference to build your own. It'll put the data into a spreadsheet but you'll have to manipulate the data manually in excel from there. 

0 Kudos
Message 8 of 28
(4,628 Views)

@Leprechaun wrote:

Here is what I have so far. I just need to send what i finish to my supervisor and he will add the rest of it


Why don't you impress your supervisor and do the entire thing yourself.

 

- tbob

Inventor of the WORM Global
Message 9 of 28
(4,603 Views)

well as i said before i am new to this program, I am only a co-op student so this is my first time actually using this in a real job position. So all I am doing is asking for help doing something that I don't completely understand being the college student that I am.

0 Kudos
Message 10 of 28
(4,585 Views)