LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting new data to a new row in same Excel sheet continuously

Solved!
Go to solution
Solution
Accepted by ery

Replace the Open New Worksheet function (so it doesn't make a new worksheet when you open the Workbook) then you need to find the next row to write in (unless you want to replace data).  I've written a VI that does this and replaced the Row constant with the next row from the last time the Workbook was saved.

 

La_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Download All
Message 11 of 26
(1,423 Views)

Can you please include the open specific worksheet.vi for me? since I don't know why I couldn't open that VI

thanks a lot Jim, you are the best ^^

 

thanks again,

Ery

0 Kudos
Message 12 of 26
(1,419 Views)

Thanks, Problem solved!!

 

Thanks Jim ^^

0 Kudos
Message 13 of 26
(1,416 Views)

Hi Jim, Sorry to bother you again, I just wonder how do you connect the get next xl row.vi to the cell value? I try to use the function you posted, but it's now working, I actually need to get next xl column instead or row, since I need the output value to excel set to next column everytime I finished recording and save the excel and run it again.

 

thanks again,

Ery

0 Kudos
Message 14 of 26
(1,401 Views)

Hi, Ery.

 

I'm not sure I understand what's not working, but you can rewire the output from the attached VI and it will give you the next column number.  I've modified it to return the next column as well as row.

 

Jim

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 15 of 26
(1,396 Views)

Hi Jim, 

 

I try to wire the output of get next row & column but it couldn't be connected, I attached the picture and my vi

 

thanks,

Ery

 

Download All
0 Kudos
Message 16 of 26
(1,393 Views)

Oops.  I don't know when it happened, but there was a class conflict.  I had the terminal wired incorrectly, but that doesn't tell me how the type changed.  Anyway, here's a corrected VI.

 

You may also need to modify the wiring a bit to get the

 

La_BD.png

 

or, this

 

La_BD.png

 

depending on what you're trying to do.  Regardless, you can't set the column tunnel to Use Defaults if Empty because you'll get a zero every time after the first loop.  Use a Shift Register to carry it back around.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 17 of 26
(1,389 Views)

Yeap, thanks, it's working now, but the system seems a bit wierd, I attached the picture show how exactly what I need when run and stop then run again this vi which show the result on excel

 

Thanks,

Ery

0 Kudos
Message 18 of 26
(1,387 Views)

You need to understand how the Shift Register works with the Case Structure.  The True case is where you put the initial Row,Column pair.  You want the row to always start at 1 and the column to start with whichever is next.  The false case is where you'll increment the cell position.  You want the row to increment and the column to stay the same.  As Nike says: "Just do it."

 

La_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 19 of 26
(1,381 Views)

Thanks Jim, Just as you said, I put it that way, but I keep getting the next row(1048577) and Next Column(16385) which is nothing show on the excel

Ery

Download All
0 Kudos
Message 20 of 26
(1,365 Views)