LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to append a row in each iteration to the excel file, please advise how can i do that?

Solved!
Go to solution

Hello, 

I want to append a row of data to the end of the same excel sheet in each "for loop" iteration to and have the "row name" increasing each time( for example row1, row 2) how can i do that?

I use the append table to the row but it keeps replacing the last date in the row.

Thanks

0 Kudos
Message 1 of 5
(4,018 Views)

Can you show your existing code?

 

Also, do you mean an actual Excel sheet, or a simple CSV file?

 

Formatting the row name should be fairly straightforward - if this is the only thing happening in the loop just take the 'i' value and use Format to String. If you have a case structure and not every iteration leads to a write, then use a Shift Register and increment the value when you write it.


GCentral
0 Kudos
Message 2 of 5
(4,008 Views)
Solution
Accepted by topic author Armik96

Actually, here's some code that I think does what you want.

 

Note that the row returned is the last row written, you need to increment it to avoid overwriting (which might have been your original problem)

Example_VI_BD.png


GCentral
Message 3 of 5
(4,003 Views)

Thanks for your help i think it could help. can you upload your code ?

0 Kudos
Message 4 of 5
(3,962 Views)

It's a VI Snippet (see the version in the top left). You can drag it onto a block diagram from the browser or your harddrive. You can't copy and paste it though - then it just pastes a picture.


GCentral
Message 5 of 5
(3,957 Views)