03-10-2017 02:26 PM
Hey all,
I would guess that someone's already thought of this, but I just whipped it up so I thought I'd share. Say I've got 2D floating point data in Excel that I want to bring into LabVIEW. Normally, I would think to load it from the file. This involves putting down a read from excel node, getting the file path, parsing the data, etc. I've always wanted to be able to copy/paste straight into a 2D Array, which to my knowledge, isn't possible.
However, I came up with a quicker solution! In the attached VI, simply copy your data to a clipboard, drop it on the block diagram, and run it. Save yourself some minutes!
Cary Schneider
Solved! Go to Solution.
03-10-2017 02:32 PM
A bit easier is to just drop a string constant onto the block diagram and paste into that. Then you don't need all of the VI scripting functions.
03-10-2017 02:38 PM - edited 03-10-2017 02:39 PM
Hi Cary,
Save yourself some minutes!
😄
Yes, as already mentioned you should use a string control instead!
Guess what: it also works in the opposite direction when copying data from LabVIEW to Excel (using a tab as delimiter)…
03-10-2017 02:40 PM
There is also a "read from Clipboard" method available.
Ben
03-10-2017 02:44 PM
Ah, true! Though, I still like the capability of making use of comments to bring information into the workspace. There's probably some cool function down the road that may make use of it.
Sure would be nice to be able to paste data straight into an array or something, though.
03-10-2017 02:52 PM
Ben
10-11-2020 07:08 AM
For the sake of newbies...
1) Application control->Invoke node->place on canvas
2) Once placed, right click to "select method"->Clipboard->Read From Clipboard
3) format the data with pallette string->format string to array
My 1.5 cents