LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to measurement file, adding column name in text file.

Any idea how to solve it?

Message 11 of 29
(2,280 Views)

Are you trying???  You are concatenating together three strings that need to be built into an array.  Right-click the concatenate VI and select replace, then look in the array palette to find what you need to replace it with.  Also chek out some of the examples (Help > Find Examples...).

 

Another trick, notice that the spreadsheet VI is white.  That means it is NOT a primitive so you can open it up and look inside...  Smiley Happy

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 12 of 29
(2,266 Views)

There is no point in the Replace Array Subset that I am seeing.  You can just delete that.  Then replace your Concatinate String with a Build Array.  Your 1D Array of strings should just go into the Write Spreadsheet File.  You already have the Append To File set to TRUE, so you should be good to go from there.


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 13 of 29
(2,258 Views)

Yes, I'm trying all the time. One problem solved and another is coming on.

 

So I'm back again with this. It's not working.

 

plik3.png

 

Question 2: How to add column names?

0 Kudos
Message 14 of 29
(2,253 Views)

You had list of Column names Make that a 1D array of strings and write the spreadsheet before the loop

Then make the Transpose F on the write inside the loop


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 29
(2,237 Views)

You really shouldn't be constantly opening and closing a file that you are logging to.  That is what the Write Spreadsheet File does.  Instead, create the file and write your headers before the loop.  Then write your data inside of the loop.  Be sure to close the file once the loop is done.  The "\ Codes" display on the string constants and the Format String are a lot of help here.


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 16 of 29
(2,229 Views)

I did the same example as you crossrulez and look what I got.

 

I have no idea what the problem is.

 

plik4.png

0 Kudos
Message 17 of 29
(2,218 Views)

That's because Tim forgot to change the display fomt of his format specifier string.  \\ sends a literal \ they shoub be single \s and \code display so \r and \t a4e return and newlineSmiley LOL


"Should be" isn't "Is" -Jay
0 Kudos
Message 18 of 29
(2,215 Views)

To be honest I don't understand what is inside the string constant wired to  Format Into String, and again I want to use Write to spreadsheet as I want to record data from graph and time.

 

The problems are:

 

I can't format separated columns.

I can't add column names.

 

Please help.

0 Kudos
Message 19 of 29
(2,209 Views)
Ctrl+h. Then read the detailed help!

"Should be" isn't "Is" -Jay
0 Kudos
Message 20 of 29
(2,198 Views)