ENH: allows word / PPT / outlook formatting as output of to_clipboard
Feature Type
-
[X] Adding new functionality to pandas
-
[ ] Changing existing functionality in pandas
-
[ ] Removing existing functionality in pandas
Problem Description
The function to_clipboard allow to copy a dataframe, then paste it. It has an option to format the data such as it is pastable directly into Excel. However it doesn't allow to paste the data into MS Word / Powerpoint / Outlook. Also - it might be a different issue - but it would be very nice to be able to copy style, as currently to_clipboard throws an error on a styler object.
Best, Lucas
Feature Description
- allows to clipboard to works on styler objects
- allows and option in to_clipboard to copy_paste to MS word / outlook / ppt
Alternative Solutions
current solution is to use pyperclip then copy paste into excel then into MS word / outlook / ppt
Additional Context
No response
Thanks for the request. Is there a suggested implementation? Here is the implementation for excel=True
if sep is None:
sep = "\t"
buf = StringIO()
# clipboard_set (pyperclip) expects unicode
obj.to_csv(buf, sep=sep, encoding="utf-8", **kwargs)
text = buf.getvalue()
clipboard_set(text)
It seems to me an implementation for Word, PowerPoint, Outlook, and other applications would be much more effort and outside the scope of pandas.
I am trying to understand what would be needed. I am asking here and there and will propose something when I figure out what would word need.
I don't think that we want to take on the burden of maintaining compatibility with these formats, this would need a 3rd party package that we could dispatch to