LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview GOOP for Excel

Solved!
Go to solution

Hi everybody,

 

I am new with Labview and I would like to copy and paste data from a .txt file to an Excel sheet.

Do you know if there is a link somewhere on the internet to download a version of the "GOOP" Toolkit for Excel that works at least with Labview 2014 ?

This one is too old .... http://www.ni.com/example/27974/en/

 

Or maybe is there already someone who did a VI that do (or almost) what I want ?

 

I would like to read a .txt file structured for example like this :

 

Test Date XXXXXX
Test Stage XXXXX
Repetition XX

Voltage 1 [V] XXXXX
Voltage 2 [V] XXXX
Temp 1 [°C] XXXX
Temp 2 [°C] XXX
Result XXXX

Num 1 X
Num 2 X
Num 3 X

Script Name XXXXX
Script Version XXXXX

 

And to copy and paste line by line the results (XXX) in the different cells of the first empty line of a specific Excel sheet

Make a screenshots of the table with all the values and titles

Save the picture in a specific folder

Save the Excel sheet...

 

Thank you for your time and consideration

 

Cheers

0 Kudos
Message 1 of 12
(3,888 Views)

If you are running LabVIEW 2014, you should have available the Report Generation Toolkit which implements reading and writing Word, Excel, and HTML "Reports".  There are numerous examples included with LabVIEW, plus other examples on the Web and in these Forums (I wrote several of them).  They are (fairly) easy to use (assuming you are facile in LabVIEW), reasonably fast, and do most of the "common" things you would want to do.

 

Bob Schor

0 Kudos
Message 2 of 12
(3,881 Views)

Hello,

 

to read the data from your .txt file I recommend you the Read Delimited Speadsheet.vi from the File I/O function palette.

 

You get the data as an array and to save this data as an Excel file you can use the Report Generation Toolkits. I searched a example for you.

 

 

I think you want to save a image of the front panel of your MainVI, here´s a good description how to do this.

http://digital.ni.com/public.nsf/allkb/09FAC3BEE5B9C38B862570EC00698237?OpenDocument

 

kind regards,

 

Wolfgang Schmailzl

0 Kudos
Message 3 of 12
(3,832 Views)

Hi wschmail and Bob_schor,

 

Thank you for your answers.

 

wschmail can you send me again the document you sent Excel Report - Conditionally Formatted Spreadsheet.vi ‏20 KB on a version that can be run with Labview 2014 please ?

For the screenshot it's not exactly what I want to do... as I would like to save a screenshot of my Excel sheet.. I think I will have to do it running a macro in my Excel... but I do not know the code for the macro yet.

0 Kudos
Message 4 of 12
(3,824 Views)
Solution
Accepted by Neercs

Hi Neercs,

 

sure here it is for LabVIEW 2014.

 

I found a LabVIEW VI to run an Ecxel Makro as well.

 

Hope I could answer your questions.

 

Kind regards.

0 Kudos
Message 5 of 12
(3,812 Views)

These examples, and more, can be found on your own machine.  Open LabVIEW, go to Help, Find Examples ..., click the Search Tab, choose Directory Structure, and find Report Generation/Excel Reports.  You will find both wschmail's Examples, along with several additional Examples.

 

Bob Schor

 

0 Kudos
Message 6 of 12
(3,794 Views)

Thanks it helped me.

 

I tried to do something...

Hoewver it doesn't work perfectly. When I try to withdraw the empty/blank lines from my data nothing is changed...

When I want to convert these data into an array of string I just get numbers...

 

Capture.PNG

 

Moreover I do not understand why when I want to get the last empty row, the Labview module takes into account the borders...

If I open an empty sheet in Excel and add borders on a cell the last empty row return the row places after this cell...

 

Do you have any idea ?

0 Kudos
Message 7 of 12
(3,774 Views)

I (and I'm sure other Forum participants) would be more than happy to take a look at your code.  However, you should not force us to recreate your code from the image that you provide -- you've already done the work, so attach your VI to save us the time and effort.  It would also help to attach an example Excel file so we can be sure we understand your bit about "borders" (and maybe figure out how to handle it correctly).

 

Bob Schor

0 Kudos
Message 8 of 12
(3,764 Views)

Hi Sorry for that.

 

Here is the code, an exemple of .txt data and the Excel sheet.

0 Kudos
Message 9 of 12
(3,727 Views)

I manage to figure out all my issues except one.

 

Why a 1D array can not be append in an Excel Sheet using Exel Easy Table ? The dimension pf text data has to be 2...

0 Kudos
Message 10 of 12
(3,711 Views)