Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Paste CSV / Excel to Controls / Constants

Not sure if there's a way to copy data from Excel and paste into LabVIEW controls and constants but I haven't had much luck.  Also there's seems to be an Export to excel, but no "Import from Excel" shortcut menu.  Normal programmers will write code to import the table and column headers at runtime, but sometimes you just need to paste data into 2D array string constants for prototyping etc.

 

So being extremely bored in quarantine I made a simple quick drop plugin that lets you copy data from Excel or Notepad (in CSV,TSV,SpaceSV,;SV format) and paste it into various controls.  Hopefully I'm not duplicating an existing capability but if so, oh well it was a fun exercise.

 

Default shortcut key is Q because I couldn't think of any other letter.  Shift Q removes the first row (header) and places it in the "Col Headers[]" of appropriate controls.

 

This should probably be a Shortcut Menu Plugin, but I can never find that group because I always think of the Right Click Framework (RCF), search on it and fail.  The next step will be to adapt to a shortcut menu.

 

This is my first attempt at publishing a quick drop plugin (and using github) so pardon any faux paus I make.

Message 1 of 6
(4,342 Views)

This is a cool plugin, thanks for sharing.

 


@bean123 wrote:

 

This should probably be a Shortcut Menu Plugin, but I can never find that group because I always think of the Right Click Framework (RCF), search on it and fail. 


There is a vanity URL: http://www.ni.com/lvmenus

 

Hopefully that's easier to remember?

0 Kudos
Message 2 of 6
(4,325 Views)

@bean123 wrote:

 

This should probably be a Shortcut Menu Plugin...


I have the attached (LV 2015) shortcut I use occasionally, which allows me to copy from Excel, paste into LV and then right click the constant/string and convert it to an array. Not ideal, but it does the job. I think I wrote it, but I don't remember doing it (it's extremely basic and quick and dirty, so it wouldn't surprise me that I don't remember).

 

It seems like a port of your plugin will be more elegant, but this has been useful.


___________________
Try to take over the world!
0 Kudos
Message 3 of 6
(4,296 Views)

Thanks I'll take a look.

0 Kudos
Message 4 of 6
(4,285 Views)

Ok I created a companion shortcut plugin menu for this quick drop and added it here.

 

Also during development of that, I found a few issues with the parsing and updated this quick drop.  

 

The quick drop and shortcut menu share subvis.  For now I have separate copies of each subVI in both libraries.  I'm sure thats not the best way of doing things.  Any suggestions on how to handle this?  Is there some common folder (other than vi.lib or user.lib) that subVIs for both quick drops and shortcut plugins should go or is it OK to have duplicate VIs (and names) in each subdir?

 

Latest versions are always on github but attached here for your convenience.

Download All
0 Kudos
Message 5 of 6
(4,260 Views)

There's been a request to support Maps/Sets in the Shortcut Menu Plugin forum.  Would you guys like to see that in the quick drop plug in as well?

0 Kudos
Message 6 of 6
(4,229 Views)