LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spreadsheet output

how can I send my output into a spreadsheet without having to ask for the spreadsheet headings to be written everytime?  In other words, can I create a step to write the headings on the spreadsheet and then be able to continue wrting data in the same table without the need to re-create the step for the headings?
0 Kudos
Message 1 of 8
(3,688 Views)
Are you using the Write to Spreadsheet File VI to write the data to a text file?  Or using ActiveX or the Report Generation Toolkit to write to an Excel Spreadsheet?
0 Kudos
Message 2 of 8
(3,669 Views)

Or are you using Write to Measurement File?

 

Or are you using Write to Text File?

 

Or are you using Write to Binary File?

 

Or are you using the XML functions (if you're trying to use the Office 2007 Open XML format)?

0 Kudos
Message 3 of 8
(3,638 Views)

Hi,

I would do it like that. Hope it helps. If you post your code it will be easier for us to help you.

 

Test.png

 

0 Kudos
Message 4 of 8
(3,623 Views)
I am using the write to spreadsheet command
0 Kudos
Message 5 of 8
(3,609 Views)

UF newbie wrote:
I am using the write to spreadsheet command

Then you can just do as the code provided by Dimitrios shows. Write out your header first, then write out your data, using the "append to file?" input.

 

Note that in the example posted the sequence frame is not necessary. All you need to do is to use the "new file path" output rather than branching the wire. This will guarantee that the header is written before the loop starts. 

Message 6 of 8
(3,595 Views)

Very good point smercurio_fc,

Just in case you are not familiar with LabView. I have created an array of 2 Headings using strings.Inside the loop i have generated some 'random numbers' for  your first column and added 5 to the same number for your second column. Then i just have build an array with both numbers. Don't forget to put some delay in your while loop so it allows your proccessor to do other things as well.

 

0 Kudos
Message 7 of 8
(3,554 Views)
Sorry i forgot to attach the code
0 Kudos
Message 8 of 8
(3,553 Views)