Closed Spammed closed 3 years ago
What would you expect to be pasted after running this? A full XLSX file or just the CSV content? You could use xlnt to build or read a workbook in memory and write it to an array of bytes. You'd have to use a clipboard library to get the data into your clipboard. Here's one I found after a quick search https://github.com/dacap/clip
I have to admit to not having thought about this well. I have now taken a look at the variety of formats that MS-Excel offers in the Windows clipboard. CSV is also among them :-)
At some point I would like my program to be able to exchange data with MS-Excel via the clipboard but without loss, i.e. without detour via a text representation like CSV.
We can close the topic until it (or I) become(s) more concrete. Thanks for your thoughts.
Is it possible to build a workbook or a cell range and copy it to clipboard? Or: How would one implement something like that?