LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

write excel file

Solved!
Go to solution

Hello!

 

I am trying to generate an excel file (.xls or .csv) which contains four columns, data for each column is an array of doubles. I have tried several ways to get it (using commas with the csv and tabs withe xls) but i am not able to get the four columns of values. How can I do this?

 

Also, I would like to know if it is possible to include an image (of a chart generated in the VI) in the excel file that I am trying to generate.

 

Thanks in advance,

 

Jessica

0 Kudos
Message 1 of 18
(3,041 Views)

This sample generate 4-column file

4c.png  txt.png

 

 

If you want work with excel you need LabVIEW Report Generation Toolkit

Message 2 of 18
(3,021 Views)
Solution
Accepted by topic author jess1006
04-05-2016 08:10 AM

As Artem noted, to work with Excel (meaning to output a file in an Excel-specific format, .xls or .xlsx, as opposed to a text file delimited by Tabs or commas, the latter called "Comma-separated-value" files, extension .csv, a file that Excel "hijacks" by assigning it an icon that suggests it is a native Excel format), you need the Report Generation Toolkit, standard now with LabVIEW 2014 and 2015, but an add-on for LabVIEW 2012.

 

You can use the Write to Spreadsheet File (which, as noted, writes tab-delimited files, though you can specific comma-delimited to give you .csv files).  Just arrange your data as a 4-column, many-row array of numeric or text data.  I don't use these functions, myself, though I do use the RGT to read/write .xlsx files ...

 

Bob Schor

Message 3 of 18
(3,006 Views)

Thank you Artem and Bob!

 

In the end I am using TDMS files as are easy to work with and can be open easily in excel. Do you know if it is possible to "write an image" generated in labview (image of a chart) in a .tdms file?

 

Thanks again,

Jessica

0 Kudos
Message 4 of 18
(2,981 Views)

Hey,

 

You cannot store directly an image in TDMS file but there is a work around

 

Maybe this article can come in handy:

https://decibel.ni.com/content/docs/DOC-40754

 

Regards,

-Natalia

0 Kudos
Message 5 of 18
(2,945 Views)

Thanks Natalia!

 

I nave seen i need to download the IMAQ drivers. I am using LabVIEW 2012 so i have seen in a forum (http://forums.ni.com/t5/LabVIEW/Where-can-I-find-IMAQ-4-7-for-download/td-p/2451692) that i can download it from here:

http://www.ni.com/download/ni-device-drivers-february-2013/3802/en/

 

However according to this page this a download of device drivers...

Can anyone tell me if I should download this just to get the IMAQ drivers?

 

Thanks a lot in advance!

0 Kudos
Message 6 of 18
(2,931 Views)

Hey,

 

It seems like the .vi is using some peaces of vision acquisition software, indeed the link you posted is where you should download the driver from.

 

I am not sure whether the .vi will work after you have downloaded the driver if you don't have vision acquisition software.

 

Could give it a go tho

 

Regards,

-Natalia

 

Check drivers compability withthe LabVIEW version you have:

 

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

 

0 Kudos
Message 7 of 18
(2,912 Views)

Hey,

 

It seems like the .vi is using some peaces of vision acquisition software, indeed the link you posted is where you should download the driver from.

 

I am not sure whether the .vi will work after you have downloaded the driver if you don't have vision acquisition software.

 

Could give it a go tho

 

Regards,

-Natalia

 

Check drivers compability withthe LabVIEW version you have:

 

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

 

0 Kudos
Message 8 of 18
(2,911 Views)

hi

 

i m bijoe

 

i m having doubt on saving excel file using write to measurement file icon...

I have attached the image format of the saved measurement file .While the file is saved , it generates header as untitled,untitled1,untitled2,,so on as shown on the image.Please suggest me a solution to change the header of  excel file through VI program according to my convenient.

 

 

Picture1.png

0 Kudos
Message 9 of 18
(2,892 Views)

If you are writing the excel file with tdms it is easy. Just add the the header of the column as shown in the image attached.

0 Kudos
Message 10 of 18
(2,884 Views)