LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

csv starts in collumn b after a newline

Solved!
Go to solution

Hi Guys,


I'm building a csv with 4 rows of data added each time the vi is run. For some reason lines 2-4 start in collumn B, not A like they should. I tried deleted the first index of the array, but that didn't help. 

 

All incoming arrays are the same size, as well as the arrays being added to the file.  Its probably easier to see what's going on with a screen shot.. there are a bunch of sub vi's.

Here is my code -

 

code 1.png

 

and here is what the csv looks like -

 

csv.png

 

 

I know it is an obvious solution.. i'm just blind right now, lol!

Thank you!

Christopher

0 Kudos
Message 1 of 6
(2,656 Views)

Could you post the actual code and an example of the csv file being generated.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(2,654 Views)

Sure, three subvi's are attached, and 2 more in the next post.

 

Thanks!

0 Kudos
Message 3 of 6
(2,649 Views)

Here are the main VI and the csv.

Download All
0 Kudos
Message 4 of 6
(2,648 Views)
Solution
Accepted by topic author Pickering

Hi Pickering,

 

your path handling is kind of wierd: converting from string to path and vice-versa all the time! Why don't you stick with path datatype?

 

- Building arrays is done best using BuildArray. InsertIntoArray is kind of overkill here!

- Don't include your own LF/CR elements in the array. This is handled by the WriteToSpreadsheetFile function internally!

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(2,636 Views)

Perfect!  Thanks for the tips as well.

0 Kudos
Message 6 of 6
(2,629 Views)