LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save data to excel

Solved!
Go to solution

here is 2019 version

0 Kudos
Message 11 of 19
(116 Views)
Solution
Accepted by tominsek

Hi Tim,

 


@tominsek wrote:

here is 2019 version


Thanks.

 

Try this:

Add the column headers as row before the item string array: as you write the whole MCLB content at once there is no need for two file write calls.

 

And I guess from your images there are EOL chars in the SQL data: remove them before creating CSV files!

Yes there are EOL chars:

(Maybe you should delete the EOL chars right after reading from SQL DB?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
Message 12 of 19
(110 Views)

Gerdw

how do i delete EOL chars?

 

0 Kudos
Message 13 of 19
(104 Views)

Hi Gerdw 

we are closer to the solution...

the data are written in only one column in excel. it needs to be written 1 thing in 1 column

0 Kudos
Message 14 of 19
(94 Views)

Hi Tim,

 


@tominsek wrote:

how do i delete EOL chars?


I embedded an image in my message…

(The function is called TrimWhiteSpace.)

 

Other stuff:

  • Don't hide labels in the block diagram.
  • Don't place too much code inside case structures, especially when it is the same for all cases:
  • Are you sure you need a timeout between VISAWrite and VISARead?
  • You really should handle statemachine data in a cluster in a shift register! No need for all those local variables in the "SQL" state (and others)…
  • Are you sure you need more than one event structure in this VI?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 19
(92 Views)
Solution
Accepted by tominsek

Hi Tim,

 


@tominsek wrote:

we are closer to the solution...

the data are written in only one column in excel. it needs to be written 1 thing in 1 column


Now you are running into Excel-internal problems!

 

Your Excel doesn't handle the TAB delimiter (default in LabVIEW) as it should.

I guess it expects a semicolon instead (as my German Excel does).

 

You can easily define the delimiter at the WriteSpreasheetFile function!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 16 of 19
(88 Views)

Hi Gerdw, 

 

Thank you the only problem was that i needed to set delimiter in write delimited spreadheet to ( ; ) and now it works,...

Very thank you

0 Kudos
Message 17 of 19
(80 Views)

Someone helped me with this programm because im new to labview and honestly speaking i dont really know what im doing haha...

0 Kudos
Message 18 of 19
(77 Views)

@tominsek wrote:

Someone helped me with this programm because im new to labview and honestly speaking i dont really know what im doing haha...


Don't worry, most of us who read your posts knew that ...  Please teach him (or her) what you learned from us.

 

Bob Schor

0 Kudos
Message 19 of 19
(23 Views)