LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I output both user inputs and Labview outputs to Excel

I am a very new user of Labview, and i am trying to modify a pre-existing device driver (harvard apparatus 22 pump) to simply output the user defined variables into an Excel spread sheet.  I am assuming I am going to have to integrate some sort of clock into the device driver which will then record the data every second or so into an excel format, or even when the user 'sets' the desired pump rate, volume, etc.  I have looked at some of the Excell specific threads, particularly the GOOP one, but an not very proficient in Labview, and am not making much progress.  The pump driver in question can be found at http://www.evergreen.edu/biophysics/files/pump22_serial.htm.  What i am looking to do is output all of the variables shown here into an excel format, so we can keep track of them at a later point.  I know that this should be very easy for someone one with experience...but it is taking me forever... Please help.
0 Kudos
Message 1 of 5
(3,313 Views)
Hello,

Do you really need to write to data in an excel file ( *.xls) or would it be fine to write a text file that can be read with Excel or any other soft that reads tabulated text files ?
It is a lot easier, I think, to read and write to a text file...

Trying to help 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 5
(3,297 Views)

Well... I have read about that option, and you have a valid question. The raw data can all be sent to a .txt file, then transfered to an excel file; however, i was hoping there was a more direct route, so it could fit the formatting of a internal data tracking sheet which has already been formatted, instead of a  format like the following.

 "#### #### #### #### ####

"#### #### #### #### ####

"#### #### #### #### ####

I was hoping there was a way where it could update in a more user specific format ie:

"#### user typed data #### " 

I was hoping to automate the data capture a little to improve ease of reporting for the operators, but the more i look, it seems this will be harder than it is worth, at least for my extremely limited experience.  How would I go about just using the .txt data capture method on that driver?  And thanks for your suggestion, and help!

0 Kudos
Message 3 of 5
(3,290 Views)

Hi,

I definitely agree that it will be much simpler to just write to a tab delimited file instead of trying to use ActiveX to actually create an .xls file.  You will be able to open your tab delimited file with Excel without having to do any conversion at all. 

If your data is returned in an array, you can use the Write to Spreadsheet File VI.  There are some good examples for this VI which you can find by going to Help>>Find Examples and searching for Spreadsheet.  The Using Spreadsheet Format VI is one of the simplest. 

You can also use the regular Read/Write File VIs.  These are a bit more advanced and will require that you use the Concatenate Strings VI to insert tabs manually in the strings you are writing to file.  Again, there are many shipping examples for File I/O in the Example Finder.

Best Regards,
Megan B.
National Instruments

0 Kudos
Message 4 of 5
(3,261 Views)
Attached is an example on how to use Active X to write something to Excel
0 Kudos
Message 5 of 5
(3,248 Views)