10-19-2009 10:19 AM
Hi!
Is there a control that supports simple cell copy-paste from Excel? I'm making a program and a lot of data I can envision my user copy-pasting from Excel spreadsheets.
Arrays don't work and Table controls don't work...
I've found an ActiveX control called "Microsoft Office Spreadsheet 11.0." That works, but I don't like the idea of my code being dependent on a particular version of Office being installed.
Any help is appreciated!
-nic
Solved! Go to Solution.
10-19-2009 10:38 AM
Hi,
You can use an invoke node App.Clipboard Read to get the data in tab-delimited format. You can then manipulate this string data into your array or table.
cheers
David
10-19-2009 10:53 AM
Thanks for the response, David.
I'm browsing through the various events available, and not seeing what I am looking for. Is there a way to detect a "paste" event into my table control. I could do some "Key Down" type events I suppose. I could also use a button "paste into table" or something...
-Nic
10-19-2009 10:59 AM
10-19-2009 11:06 AM
I think using a button to action the paste of the data will be your easiest option to try and see if it works out OK for you functionally.
10-19-2009 11:19 AM
Nickerbocker wrote:
Apparently "Ctrl-V" will not generate a "Key Down" event because there is a Menu shortcut with Ctrl-V....
If you use a 'Menu Selection? (App)' event, you can look for the 'APP_PASTE' ItemTag, discard the usual event and do your own paste.
10-19-2009 12:57 PM
Weeeeee..... well, that was fun.
The only issue with the "Menu Selection? (App)" event is if I wanted to have paste features elsewhere. I think I'll end up using a button for pasting...there is an issue with the attached code that if the user is "in" a cell, that cell doesn't get the pasted data. There is also an issue if the user wants to paste a single string to a cell in my table as oppose to strings from an excel spreadsheet.
-nic