Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Copy a list to the clipboard in a format that can be pasted directly into a spreadsheet
ResourceFunction["CopyAsExcelData"][list] copies list to the clipboard in plain-text (TSV) form so that it can be pasted into Excel and most other spreadsheet and creates an output that can be clicked to copy the data again. | |
ResourceFunction["CopyAsExcelData"][str, "PlainText"] copies String str to the clipboard as plain-text and generates a click-to-copy object for that string. |
Copy an array of random numbers:
| In[1]:= |
| Out[2]= | ![]() |
Go into Excel or any other spreadsheet application and paste the values:

Click the output to copy the data again at a later moment:

Flat lists and ragged arrays also work:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= | ![]() |
Any element that is not a number or a string will be converted to a String:
| In[5]:= |
| Out[5]= |
Create a click-to-copy object for any plain-text string:
| In[6]:= |
| Out[6]= |
Note the difference with the normal ClickToCopy function, which will copy a Wolfram String instead:
| In[7]:= |
| Out[7]= |
Use First to retrieve the string that was copied to the clipboard:
| In[8]:= |
| Out[8]= |
ExportString and CopyToClipboard can also be used to copy the data programmatically:
| In[9]:= |
| Out[10]= |
| In[11]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License