06-05-2012 01:00 PM
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
06-05-2012 01:04 PM
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.
06-05-2012 01:05 PM
ive tried using string constants, and the columns move, just not the correct ones....
06-05-2012 01:30 PM - edited 06-05-2012 01:31 PM
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.
06-05-2012 04:06 PM
I just wanted the first two rows moved over one space to allign with the data file.
06-05-2012 06:16 PM
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.
06-05-2012 07:38 PM
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.
06-05-2012 10:42 PM
yes thats correct, no time header. Ive tried using string constant with commas but that doesnt work...
06-06-2012 12:47 PM
I would try to use the function Insert into Array with an empty string array of two elements or commas.
06-06-2012 05:09 PM
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.