LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use Write To Spreadsheet File in labview?

It's still unclear what your exact issue is. You've stated what you want to do but you have not said why you are unable to do it. The Write to Spreadsheet file has a 2D array input and if your time data is a separate element in the array, then it will be written to a separate column. If it's not in a separate column, then how is the array constructed? Is it a numeric or string array. If it's a string array, you can modify the Write to Spreadsheet File function according to the instructions on the block diagram. Posting the code you have will go a long ways in explaining your difficulty.

p.s. Your problem with the path was probably caused by your incorrect separator. Assuming windows, it has to be '\' and not '/'.

Message Edited by Dennis Knutson on 10-05-2007 06:16 AM

0 Kudos
Message 11 of 38
(13,827 Views)

Hi,

Actually i want the data in some format like the ones shown in required.dat file.

I am getting the 2D array output written into the file as shown in problem.dat file.

So please help me in telling the change i required to change for this.

And also i dont want to prompt create/replace file message.Is this possible.

 

Thanks in advance

Download All
0 Kudos
Message 12 of 38
(13,803 Views)
I don't know why you just don't post your code. There is no relationship between the data in the one file and the other. It's impossible to format the data in problem.txt into the data in required.txt. If you are not willing to show the way you are generating the data and where the data is coming from, I don't see how anyone can help. My only suggestion is to go through all of the tutorials at http://www.ni.com/academic/lv_training/how_learn_lv.htm.
 
 
0 Kudos
Message 13 of 38
(13,785 Views)
Hi,

what's your LabView version? I write some VI to write wks-spreadsheet files.
Or you can use DDE and Excel to export data. Also Excel OCX from SkySof
Software Inc. is able to generate direct xls files.


"subhashmadhukar" <x@no.email> schrieb im Newsbeitrag
news:1191649205035-591474@exchange.ni.com...
> Hi,
> Actually i want the data in some format like the ones shown in
required.dat file.
> I am getting the 2D array output written into the file as shown in
problem.dat file.
> So please help me in telling the change i required to change for this.
> And also i dont want to prompt create/replace file message.Is this
possible.
> &nbsp;
> Thanks in advance
>
>
> required.txt:
> http://forums.ni.com/attachments/ni/170/276531/1/required.txt
>
>
> problem.txt:
> http://forums.ni.com/attachments/ni/170/276531/2/problem.txt


0 Kudos
Message 14 of 38
(13,780 Views)

hi

i think, i have confused you people.sorry fpr that.

the thing is i want to add "Time" and "Data" strings as shown in required.txt to the file problem.txt.not the data.

 

0 Kudos
Message 15 of 38
(13,772 Views)

You've already said that you want to log date/time and data to a file. what you still haven't said is where the date/time and data is coming from. Below is a fairly generic solution when you have a 2D array of data and a 1D array of timestamps. It uses a modified version of Write to Spreadsheet as already described. If you want an exact answer to solve your problem, you have to POST YOUR CODE.

I'm assuming that you are a student but even in school, you instructors must surely provide more information for your assignments than what you are providing here. All that you have said is that you have a problem. That is not enough information to work with. You have to learn how to clearly state exactly what and why.

0 Kudos
Message 16 of 38
(13,766 Views)

hi thanks for the help.

I am posting you with the snapshot of some part of my project.where i am facing problem.

actually i need to put the row number also and i need to write into the file after 60 lines in a cv file.ie the first 60 lines should be empty.

Can u please help me in this.

Message Edited by subhashmadhukar on 10-08-2007 12:20 AM

Message Edited by subhashmadhukar on 10-08-2007 12:21 AM

0 Kudos
Message 17 of 38
(13,742 Views)

hi,

please help me.i am placing the sample vi.i want to create a csv file and put 2D array data into the file after leaving 60 rows empty.

Its creating the file but its reporting some error.I think my approach is wrong.Can anyone correct my error in the sample vi attached.

 

Thanks in advance

Download All
0 Kudos
Message 18 of 38
(13,713 Views)
You know, if you had stated the problem correctly in the first place, a lot of time would have been saved. The issue has nothing to do with the Write to Spreadsheet File at all. You want to save a time stamp but there is no time data in this code of yours. I think what you need to do is post a new question and clearly ask how to get a timestamp from NI-Vision. That is a toolkit that I do not have or use.
0 Kudos
Message 19 of 38
(13,712 Views)

hi,

i am also in trouble with wrting file in a spread sheet format.i tried with the write to measurement file.vi

but the problem is that,i want the data as a format as follows

1                     2                  3                 4                 5(these are the no of channels)

1.4                 1.2               1.78             1.5              2.1

2.3                 2.5               1.3               0.9              2.2

14                  21                10                5                 13(these all are the current values)

 

and so on

 

i want to write in this way in a spreadsheet or in a write to measssurement file.vi

any of the format.writing is my only problem

pls someone help me.

0 Kudos
Message 20 of 38
(12,718 Views)