LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

replace data in existing spreadsheet

hi...

I have one main program that running a subvi. The main program will read data from spreadsheet (Error.csv) and send the data to the subvi. The subvi will stop running after the STOP indicator is TRUE. Then I need to replace the existing data in Error.csv with the new data that come out from the subvi.I have some problem to replace the data in the same file. Please help me..
0 Kudos
Message 1 of 10
(3,786 Views)

Hi gdah,

i´m not sure what you make in your while loop, but you should use shift registers to have the newest values.

Hope it helps.
Mike

0 Kudos
Message 2 of 10
(3,782 Views)
Hi gdah,

you should already have heard: Use LESS/NO locals and LESS/NO sequence structures!!!

I changed one of your subvis, hope this helps to illustrate the above sentenceSmiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 10
(3,776 Views)
hi..
did u check my program??ok..never mind...let just ignore the subvi. my main problem is i want to replace the existing data with the new data in the existing spreadsheet file. I have try to read the file , and after a few process, replace old data with new. but unfortunately, it did not work.please assist me...
0 Kudos
Message 4 of 10
(3,774 Views)
Hi gdah,

we already assited you: USE shift registers instead of locals!

"it did not work" is not really helpful to describe a problem. What did not work? Is the part processing the data not working (because of lacking shift registersSmiley Very Happy) or is the part of writing to file not working?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(3,772 Views)

and after a few process, replace old data with new. but unfortunately, it did not work


What do mean by a few process.Can you be bit more precise?
0 Kudos
Message 6 of 10
(3,751 Views)
Hi gdah,

well, you still don't tell us more about your problem than "I have some problem to replace the data in the same file." and "it did not work".

And yes, I checked your vi and did it for a 2nd time. Now I attached the whole hierarchy with changes and comments. As you didn't specify the problem I only made changes to remove local variables and stacked sequences without (hopefully) changing your processing...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 10
(3,744 Views)
i noticed that i have deleted the local arrayB in my original program. I have run your program. It not works. The purpose of putting local is i need to update the arrayB according to the value at Array. For example, if the arrayB have 4rows and 2 columns, x and y =TRUE, that row will be deleted, and the array will remain 3rows. but if in your program, even there is a deleted row of data, the array will  remain 4 rows.

i hope u will understand what i try to say.

0 Kudos
Message 8 of 10
(3,742 Views)
Hi gdah,

ok, I have changed your algorithm by replacing the local.
But you still don't explain what's the problem for your original post...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(3,739 Views)
hi GerdW..

Thanks a  lot..I are really help me to solve this problem. I have try your 2nd program. And it's working..I have learnt a new stuff from you..thanks again..appreciate averythingSmiley Wink
0 Kudos
Message 10 of 10
(3,735 Views)