LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Record data in excel from multiple channel for multiple time

Solved!
Go to solution

Hi All,

 

I am trying to import multiple data from multiple source with header to excel file.

when i run the program, it only record the last data send. 

I wonder if there is step that I missed

hopefully your guys can help to advice

thanks in advance

Download All
0 Kudos
Message 1 of 10
(2,551 Views)
Solution
Accepted by topic author solehinrobian

Try something like this:

 

SaveDataToCSV.png

 

You might want to play with the time format as you will see the default does not give you seconds.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 10
(2,542 Views)

Hello,

 

thanks for your respond.

do you mind to share the file that you make on the picture.

There are few blocks that I am not familiar with

0 Kudos
Message 3 of 10
(2,532 Views)

It's actually a code snippet but here you go...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 10
(2,526 Views)

Thank you very much.

 

unfortunately i cant open the file.

i think it is because you use the latest version of labview compare to what i am use that is 2018 version.

may i know what are these 4 blocks?

solehinrobian_1-1640312184782.png

 

solehinrobian_0-1640312128745.png 

 

solehinrobian_2-1640312259136.png   

 

solehinrobian_3-1640312279238.png

 

 

0 Kudos
Message 5 of 10
(2,516 Views)

@solehinrobian wrote:

may i know what are these 4 blocks?

solehinrobian_1-1640312184782.png

 

solehinrobian_0-1640312128745.png 

 

solehinrobian_2-1640312259136.png   

 

solehinrobian_3-1640312279238.png

 

 


Open/Create/Replace File, Format String, End Of Line Constant, Close File.

 

You definitely need to read the help for the Format String as it can do a lot when it comes to the format string.


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 6 of 10
(2,503 Views)
Solution
Accepted by topic author solehinrobian

I decided to do some edits myself.  Here is more of what I would do.  I would have the data in an array and then use Array To Spreadsheet String to build up most of the line of data.  If time is really required, then I would do that with the Format String.  The Array To Spreadsheet String ends with the end of line, so we don't have to worry about adding that anywhere.

 

As an additional comment, I have found myself not using a CSV format because some places use the comma instead of a decimal point.  So I use tab delimited text files, which Excel can still read with no issues.


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
Download All
0 Kudos
Message 7 of 10
(2,491 Views)

It works now.

solehinrobian_0-1640315683549.png

 thank you guys for your helps!

0 Kudos
Message 8 of 10
(2,479 Views)

@crossrulz wrote:

 

As an additional comment, I have found myself not using a CSV format because some places use the comma instead of a decimal point.  So I use tab delimited text files, which Excel can still read with no issues.


I tend to agree with this but the OP was making a CSV so I just stuck with it.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 10
(2,462 Views)

@RTSLVU wrote:

@crossrulz wrote:

 

As an additional comment, I have found myself not using a CSV format because some places use the comma instead of a decimal point.  So I use tab delimited text files, which Excel can still read with no issues.


I tend to agree with this but the OP was making a CSV so I just stuck with it.


Stick to the actual requirement.  If the only actual requirement is "a file that can be read in Excel", then I will push for a tab delimited text file.  If the requirement is a CSV, then stick with what we did.  I just made this comment to give people something to consider before going too far down the line.


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 10 of 10
(2,429 Views)