LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview

Solved!
Go to solution

that example is saving it as a new CSV file. try opening it with notepad to check that the data gets written. 

 

http://zone.ni.com/reference/en-XX/help/371361J-01/glang/write_to_spreadsheet_file/ 

Daniel Harryman MEng
CLA, CPI
0 Kudos
Message 21 of 51
(1,645 Views)

A better title would have been "How to write a Cluster of Data into Excel".  Often times, when you have a huge LabVIEW routine and you come across a specific problem (such as How to write a Cluster of Data into Excel), it can be helpful to develop a new, tiny, VI that consists of (a) a Cluster of Data, (b) some code where you try to do write your Cluster to Excel (even if it doesn't work), and (c) an example of the kind of output (an Excel file, perhaps, or else a .csv file) that you hope to get.

 

Now, we all have an excellent idea as to the question, and people who do a lot of Excel-with-LabVIEW (such as I) can look at your code, try to see where your problem lies, and help you to learn how to fix it.

 

Note that "LabVIEW" is a terrible title for a Post on a LabVIEW Forum -- presumably every post here could have the same Title, and the users of the Forum would have to read each and every post to find the one or two that are relevant.  And think about the poor Newbie who wants help for a specific problem -- he (or she) isn't going to think to search for "LabVIEW" if their question is "Write Cluster of Data into Excel".

 

So what about writing a Cluster of Data into Excel?  The first question to ask (because you haven't made this clear in your posts) is what sort of output do you want?  Do you want an Excel .xls or .xlsx file?  Do you want what NI calls a "Spreadsheet" file, which is really a character-separated text file?  Are you writing out specific Clusters?  Are you trying to write out arbitrary clusters?

 

[Note -- you may have explained some of these points above, and I've skipped over them -- if so, I apologize.  However, if you learn to ask questions with proper titles, proper information, proper examples, and follow up with "I tried that, here's my revised code, and this doesn't work", you (and we) will all be happier.]

 

Bob Schor

Message 22 of 51
(1,641 Views)

Ok Thanks  Bob i want to transfert the tables contained in the cluster to an excel File .the function write into  delimited spreedsheet of labview seems to work right but when i want to open it in excel it doesn  open 

0 Kudos
Message 23 of 51
(1,634 Views)

You need to attach a VI.  When you reply to this post, you'll see a picture like this:

 

Attachment.png

 

Write your response, click on the "Choose File" button at the bottom, then select the VI that you want to attach, (the VI whose picture you showed).  We can't edit or execute pictures -- we need to work with VIs.

 

Bob Schor

0 Kudos
Message 24 of 51
(1,628 Views)

there s just one cluster ,when you find it please help me take it to excel

0 Kudos
Message 25 of 51
(1,621 Views)

Now we're getting somewhere (after 25 posts!).  I now know that you are running LabVIEW 2015, so you have access to the Report Generation Toolkit functions.  I also know that your Cluster is a Cluster of 6 arrays.

 

How about an indication of the format you want for your Excel file?  Start with a proposed filename (this will tell me if you want "real Excel", meaning an .xls or .xlsx format, or a LabVIEW Spreadsheet File).  Then either mock up, or describe, how you want the data to be stored in the file.  This could include whether or not you want it to be 6 columns with many rows, 6 rows with many columns, whether you want the Cluster Element names to be used as Column (or Row) headers, etc.

 

Note -- all of this is easily done.  In fact, you can probably do it all by yourself by doing the following:  In the LabVIEW Forum, search for "Revised Example" -- the first hit should be a two-year-old Post I wrote that shows how to do exactly what you are asking about.

 

Actually, I'm going to give you a day to read my old post and try this for yourself.  I'll check back tomorrow afternoon and see whether or not you were able to "solve this" by yourself after reading what I wrote.

 

Bob Schor

Message 26 of 51
(1,618 Views)

Very well,actually i want  the Cluster Element names to be used as Column headers,and any type of excel files

0 Kudos
Message 27 of 51
(1,607 Views)

@Bob_Schor wrote:

Now we're getting somewhere (after 25 posts!).  I now know that you are running LabVIEW 2015, so you have access to the Report Generation Toolkit functions.

 

Bob Schor


What are you looking at that shows he's working with 2015 professional rather than full?

0 Kudos
Message 28 of 51
(1,598 Views)

The Read or Write to Spreadsheet Files have a Red X throught the icons.  They are still available in LV 2015, but with the red X.  They have been superceded in LV 2015 with new VI's that are named better.  (Possibly some other differences as well.)

0 Kudos
Message 29 of 51
(1,591 Views)

There's several ways I can think of to tell if it's 2015 vs 2014.

 

But, how do you tell the difference between base/full/pro by looking at the VI?  The RGT is only included with Pro.  Otherwise, it'd require the addon purchase.

0 Kudos
Message 30 of 51
(1,583 Views)