LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Export data to text file

Hello everybody,
 
I have to complete a LabVIEW program by exporting data to a text file under a defined format. At the present time, data is exported in an Excel file. As I start with LabVIEW, I don't really know how to proceed.
Do you have some information to help me to start with this task ?
 
Thank you very much !
Sylvain
0 Kudos
Message 1 of 12
(12,459 Views)
Hi  Sylvain
 
Is it possible for you to post part of the code you are using to export data to excel...i can give direct solution once i see that VI..even picture of ur block diagram also will do...there will be some change in the extension of the file while exporting. if you change that you will get text file.
 
 
 
Anil
0 Kudos
Message 2 of 12
(12,449 Views)
Thank you very much for your quick answer !
I try to attach a part of my program. It should not work completely as some VIs may be missing but it gives an idea of the program. Hope it won't be too hard to understand it.
 
Thanks
0 Kudos
Message 3 of 12
(12,448 Views)

Hello,

You can find below an exemple which is writing data to a txt file. The example is quite easy to understand.

Regards,

ClémentG
0 Kudos
Message 4 of 12
(12,417 Views)

Thnak you for the example !

Unfortunately, I don't have the right version to open the file... I'm still on labVIEW 6.1...

Sylvain

0 Kudos
Message 5 of 12
(12,413 Views)

Hi,

here is the example in 6.1.

ClémentG
0 Kudos
Message 6 of 12
(12,407 Views)
Thank you ClementG !!!
 
I made a mistake in my last mail, my version is not 6.1 but 6.0. Could you please save the file in that version ?
 
Sorry for the mistakes !
Sylvain
0 Kudos
Message 7 of 12
(12,404 Views)
Here we go
ClémentG
Message 8 of 12
(12,401 Views)
Thanks !!!
0 Kudos
Message 9 of 12
(12,397 Views)

The posted example just creates an array of DBLs and passes it to the Write to Spreadsheet File function. To create a header, you would first use Write Characters to File and then append the Spreadsheet file to that. If you have specific format you need to export, why don't you give us that. The more information you give, the better the help you'll get.

I also looked at the VI you've written. It's not a good idea to wire your stop button to the 'Stop' function. If you do this, then your hardware can be left in an unknown and possiblity dangerous state and open files may be left open. You need to do an orderly shutdown. Why didn't you add the front panel stop to your handler of the other controls?

0 Kudos
Message 10 of 12
(12,396 Views)