LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spacing data file

Im wondering how to space my first two rows on the attached excel file to the right one space. That is to move the name row and units row to the right one space to allign with the data. Additionally Ive attached a screenshot of the code where the name,units, time and data are concatenate together. Thanks

Download All
0 Kudos
Message 1 of 12
(3,410 Views)

The simple answer is that you can't. You are writing the data to a *.csv file which isn't a true Excel file. It is a text file.

If you want that degree of control, you will need to use ActiveX automation. There are examples that ship with LabVIEW.

 

 

0 Kudos
Message 2 of 12
(3,403 Views)

ive tried using string constants, and the columns move, just not the correct ones....

0 Kudos
Message 3 of 12
(3,401 Views)

Are you talking about moving one "space" or one "column"?

 

Nevermind, you want everything moved over one column so add an extra comma at the very beggining of rows 1 and 2.

 

 

0 Kudos
Message 4 of 12
(3,383 Views)

I just wanted the first two rows moved over one space to allign with the data file.

0 Kudos
Message 5 of 12
(3,360 Views)

Might not be the wrong file format, but the approach certainly isn't the right one.

 

CSV's are powerful because they're easy to parse (it's a text file), but they're not without limitations.

 

If CSV is what you want, I'd recommend using for-loops and auto-indexed arrays to build each line.  Adding a column involves adding an array element, which is much easier than moving many concatenate terminals around.

 

If an excel file is the targeted document type, use the excel file tools in labview to put data where you want it.  Much more control over the data using those tools than you get with CSV format.

0 Kudos
Message 6 of 12
(3,341 Views)

If you look at his second jpg file, you'll see that the headings are over the wrong columns. Since he is using commas, all he has to do is add a comma to the first two lines that he writes to his file.

There apparently isn't a text header for the Time column.

 

 

0 Kudos
Message 7 of 12
(3,333 Views)

yes thats correct, no time header. Ive tried using string constant with commas but that doesnt work...

0 Kudos
Message 8 of 12
(3,323 Views)

I would try to use the function Insert into Array with an empty string array of two elements or commas.

0 Kudos
Message 9 of 12
(3,294 Views)

It would be a lot easier to show you if you attach your code.  No more "screenshots" please.  Where you see screenshots, I see photos.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 10 of 12
(3,277 Views)