10-14-2022 02:55 PM
Someone asked a question how to paste data from excel to labview. So here is the answer the person got. I just don't know how to make this work. What do I have to wire the property node to?
Here is the link for what I am talking about:
https://forums.ni.com/t5/LabVIEW/Pasting-Excel-data-into-front-panel-table/td-p/1332044
Solved! Go to Solution.
10-14-2022 03:21 PM
Looking at the code I would think you would first have to open an Excel document and copy a group of cells. This would put the cells into the clipboard so you could then run this VI and press Paste to copy the items from the clipboard to the table in LabVIEW.
10-14-2022 04:00 PM
It works.
10-14-2022 04:05 PM
Yes, you are just reading the computer clipboard and unless you just copied (ctrl+c) something useful to the clipboard, all you probably get is garbage.
(From excel, you'll get a tab delimited spreadsheet string of the selected cell range and the code will turn it onto a 2D array of strings.).
(I am not sure why the table in this example code is a control instead of an indicator. I would just make it an indicator and eliminate the property node! 😄 Even if you want the table as control, a local variable would be preferred over a value property. Tables should always be indicators, because using them for data entry required a lot of validation code to ensure that the entered data is reasonable.)
10-14-2022 04:37 PM
Thank you, Mr. Altenbach for the feedback. I also wasn't sure why a property node was used.