LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an elegant way to paste data from a spreadsheet directly into a front panel control in Labview?

Hi, I am working on an application where users will have independently gathered data and will need to copy it from a spreadsheet and paste it into a front panel control in Labview (6.1). All the solutions for loading data from a spreadsheet file are therefore irrelevant.

I have developed a "spreadsheet" control which is simply a string control that you paste tab delimited data into and that is then converted into an array. This works, but looks clumsy and ideally I want a control that looks like a spreadsheet with grids etc. The table control looks good, but you can't paste blocks of spreadsheet data into it. Is there a better way than what I am currently doing?


Ross.
0 Kudos
Message 1 of 3
(2,636 Views)
If you're OK with the copying and pasting, you could continue getting the data into LabVIEW that way, and after converting the data into an array, you can write it to a table through the 'Value' property of a property node. This takes a 2D array of strings.

If you want to get away from the copying and pasting, you'll have to look into ActiveX or DDE.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 3
(2,636 Views)
> Is there an elegant way to paste data from a spreadsheet directly into
> a front panel control in Labview?

If you implement your own menu items, or use the event structure, you
can intercept the paste command.

I don't think there is anything built in to read from the system
clipboard, but I'm pretty sure there are VIs on developer zone to do so.
You can read the text from the clipboard, read the focused object to
ensure it is the table, read the selected cells, and insert the text
into the table yourself.

And in case you are asking if it will ever be built in, yes, I expect it
to be there in a future release, but the current controls deal primarily
with internal binary data and haven't expanded to deal with external
clipboard data yet.

Greg M
cKaskle
0 Kudos
Message 3 of 3
(2,636 Views)