Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the contents of the clipboard as an expression
ResourceFunction["ClipboardContent"][] creates an expression from the contents of the clipboard. | |
ResourceFunction["ClipboardContent"][h] wraps the head h around the results before returning. |
Get the contents of the clipboard:
In[1]:= |
Out[2]= |
Apply the head Hold to prevent evaluation:
In[3]:= |
Out[4]= |
When multiple cells are copied from a notebook, a list of expressions will be returned:
In[5]:= |
Out[6]= |
Cell content will be converted to strings when necessary:
In[7]:= |
Out[8]= |
ClipboardContent is similar to Paste:
In[9]:= |
However, Paste prints a new cell, while ClipboardContent returns an expression:
In[10]:= |
Out[10]= |
In[11]:= |
Out[11]= |
Get an expression of the current notebook through the clipboard:
In[12]:= |
Out[14]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License