LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting a Spreadsheet

This may seem like a stupid question but why is this writing to the file in only a 1d array? it should be 3 columns but its only writing to the file as one column. Please see the pictures below. Also how do I add a time stamp as the first column? I plan to save the file as a .csv and open in Excel. 

0 Kudos
Message 1 of 5
(2,005 Views)

Please attach your vi instead of a picture. What is writing to the queue and what is the size of the 2D array? Why are you mixing delimiters (tab, comma)?

0 Kudos
Message 2 of 5
(1,985 Views)

you don't have a line feed at the end.

you could also try to use the "Write Delimited Spreadsheet.vi"

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 5
(1,956 Views)

@jwscs wrote:

you don't have a line feed at the end.

 


"Array to spreadsheet string" always inserts a linefeed at the end, so yes, there is one!

 


@jwscs wrote:

you could also try to use the "Write Delimited Spreadsheet.vi"

 


That would be significantly less efficient, because the file gets opened and closed with each iteration of the loop and it still would need tweaks and external operations to include the timestamp.

 

Message 4 of 5
(1,939 Views)

Based on the image, I don't understand why you are dealing with a 2D array.  If you add a timestamp, then you need to know the time for each row.

 

So where is this data coming from?  I have a feeling that is the source of your problem.

 

Also, you do not want to have a wait in a consumer loop.  The Dequeue Element will limit your loop rate so that it cannot process any data that has not be supplied by the producer.  But if it falls behind for any reason (ex: disk slow slowdown), you want this loop to run as fast as it can to catch up.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(1,934 Views)