From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel - like functionality in LV Control

Solved!
Go to solution

Hello all,


I'm working on a project where I want to display and edit a bunch of data.  The data consists of a 2D array of U32's.  Col. 0 will be a memory address, Cols. 1 - n will be data.  The data will be displayed in chunks of 2048 addresses.  The data will be chunks of the U32 at that address.  For example, bits 0 - 12 may represent a pointer, bits 13 and 14 may be flags, etc.  I've included a vi of what I'd like the control to look like. 

 

I'd like to do this in a Labview control on a LV Front Panel.  Further, I'd like some Excel - like functionality, specifically I'd like to be able to copy a cell and paste it to a number of highlighted cells.

 

So far, I haven't been able to find a control that will do this.  The Table and Listbox controls don't appear to allow highlighted cell contents to be pasted.  When I paste, the entire row where the copied cell lives gets inserted.

 

I tried inserting an Excel worksheet into an Activex control.  This works in as much as it displays data.  The control however appears to be read only. I'm unable to edit the data in the control.

 

I tried .Net and Activex controls.  There would be a BOATLOAD of programming behind these controls that I'm unfamiliar with and in the end, I don't know if it would work.

 

Can anyone suggest how I can get Excel - like copy/paste functionality in a Labview control?

 

Thanks in advance,

Doug

0 Kudos
Message 1 of 3
(2,272 Views)
Solution
Accepted by topic author Doug

There is no native LabVIEW control that functions like an Excel spreadsheet, allowing you to cut and paste arbitrary ranges from one location to another, short of embedding an activeX Excel control.  You could create such a control using either XControls (which are easier than you may think, they just look scary) or just the event structure.  It is a lot of programming.  You will need to override several events (e.g. drop, key down, menu activation).  A quick search of these boards or the full net did not find anything, probably due to the complex and application specific nature of this request.  Duplicating full Excel-like capability would require a lot of work, and most UIs do not require the full function set, so are written with only the functionality they need.  This makes them less general, so they do not get published.  If you come up with something general, be sure to post it.  If you need help with any part of it, let us know.

0 Kudos
Message 2 of 3
(2,241 Views)

Thanks for the reply DF.

Yeah, I've started implementing basically what you suggested.  I found Selection Start and Selection Size properties for the Table control.  And, as you suggested, I overrode the right-click in my Event structure.

If I ever get 'round to putting it in an XControl, I'll post it here.

 

Doug

0 Kudos
Message 3 of 3
(2,223 Views)