Gabor Grothendieck
2005-Sep-22 15:13 UTC
[Rd] Wishlist - access non-text from clipboard in Windows
Just wanted to post this wishlist item. Currently one can read text from the Windows clipboard but the Windows clipboard can hold all sorts of objects, not just text, and it can hold them simultaneously. For example, if one selects some cells in Excel and then copies them to the clipboard, the clipboard will have all the cell boundary information but R can only read the text and will have to figure it out if it can. It would be nice if the user could use R to access all the information on the clipboard, not just the text.
Duncan Murdoch
2005-Sep-22 16:42 UTC
[Rd] Wishlist - access non-text from clipboard in Windows
On 9/22/2005 11:13 AM, Gabor Grothendieck wrote:> Just wanted to post this wishlist item. > > Currently one can read text from the Windows clipboard but the Windows > clipboard can hold all sorts of objects, not just text, and it can > hold them simultaneously. For example, if one selects some cells in > Excel and then copies them to the clipboard, the clipboard will have > all the cell boundary information but R can only read the text and > will have to figure it out if it can. > > It would be nice if the user could use R to access all the information on > the clipboard, not just the text.This looks like something someone should write a package to do. It needs lots of support (e.g. what do all the possible clipboard format constants mean, what binary format corresponds to each, etc.), but it would only be useful on the Windows platform. Duncan Murdoch
Gabor Grothendieck
2005-Sep-22 17:12 UTC
[Rd] Wishlist - access non-text from clipboard in Windows
There is an open source clipboard extender CLCL that handles all clipboard formats. I think this code could be leveraged to simplify it substantially. Run CLCL and copy something from IE or Excel, say, so that you have a complex object in the clipboard. Now expand Clipboard in the left pane and the various components in the clipboard are shown in the tree as children. You can right click and save any of them. If this code could be followed it might be simple to just have a new argument to clipboard() which specified which component to return or one could optionally return a list of all of them. On 9/22/05, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:> On 9/22/2005 11:13 AM, Gabor Grothendieck wrote: > > Just wanted to post this wishlist item. > > > > Currently one can read text from the Windows clipboard but the Windows > > clipboard can hold all sorts of objects, not just text, and it can > > hold them simultaneously. For example, if one selects some cells in > > Excel and then copies them to the clipboard, the clipboard will have > > all the cell boundary information but R can only read the text and > > will have to figure it out if it can. > > > > It would be nice if the user could use R to access all the information on > > the clipboard, not just the text. > > This looks like something someone should write a package to do. It > needs lots of support (e.g. what do all the possible clipboard format > constants mean, what binary format corresponds to each, etc.), but it > would only be useful on the Windows platform. > > Duncan Murdoch >