Skip to content

Excel and co. can parse a table from the clipboard, but pandas to_clip uses wrong format #3368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Apr 15, 2013 · 10 comments · Fixed by #5070
Closed
Labels
Enhancement Ideas Long-Term Enhancement Discussions IO Excel read_excel, to_excel Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@ghost
Copy link

ghost commented Apr 15, 2013

No description provided.

@jreback
Copy link
Contributor

jreback commented Oct 1, 2013

what do you mean by wrong format?

it just writes text, does it need to have a sep for example?

@ghost
Copy link
Author

ghost commented Oct 1, 2013

It's been a while, iirc, just open up excel, copy a table and then paste it into an editor,
that's the format. pandas exports something else which excel can't parse.

Should be an easy fix.

@ghost
Copy link
Author

ghost commented Oct 1, 2013

Just remembered something else from way back, there's a way to get excel
to accept the data directly without going through the import wizard, I think it needs
to be UTF16LE+BOM. Probably requires some playing around to get it working.

Not necessary, but convenient (for excel anyway).

@jtratner
Copy link
Contributor

jtratner commented Oct 1, 2013

Just needs to be tab delimited, instead of space delimited. (I was able to
do copy/paste directly with the current setup, it just puts it all in one
column for now):

col1\tcol2\tcol3\n
a\tb\tc\n

Really simple. I think current versions of Excel (i.e., 2007+) don't need
the header at all.

@ghost
Copy link
Author

ghost commented Oct 1, 2013

Should test with libreoffice as well. and unicode.

@jreback
Copy link
Contributor

jreback commented Oct 1, 2013

tab deliminted doesn't work when cross-exporting, between x and windows I made the defautl to do csv

@ghost ghost assigned jtratner Oct 2, 2013
@jtratner
Copy link
Contributor

jtratner commented Oct 2, 2013

I think we settled on using tabs on Windows/mac and then commas in Linux?

@jtratner
Copy link
Contributor

jtratner commented Oct 2, 2013

Someone care to test what works on Linux? Tabs on windows/mac means you can paste into excel and all the columns work well.

@ghost
Copy link
Author

ghost commented Oct 2, 2013

Tabs work fine on libreoffice in linux.

@jtratner
Copy link
Contributor

jtratner commented Oct 2, 2013

@jreback that suggests '\t' is the correct choice. In what circumstance wouldn't you want that to be the default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Ideas Long-Term Enhancement Discussions IO Excel read_excel, to_excel Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants