[wxpython-users] Re: grid to clipboard to spreadsheet
Randall Smith
randall at tnr.cc
Thu Apr 3 10:09:36 PDT 2008
C M wrote:
>
> Maybe this could be helpful. Using this kind of grid works for me for
> copying and pasting into Excel, though I'm not sure which types you are
> referring to (in my case it has times, integers, and text). I also
> still don't know the original author of this class and wish I did (if
> anyone here knows, as it is all that person's work):
> http://article.gmane.org/gmane.comp.python.wxpython/51644
>
> CM
>
Thanks.
What he did in that implementation is separate columns with tabs "\t"
and rows with line breaks "\n". That's exactly what I did except I used
the csv module so I wouldn't have to handle escape characters manually.
Types are not maintained, just their string representation output.
So when you paste into Excel, it doesn't prompt you to format the data
first? Maybe it's just an Excel thing. I've just been using Gnumeric
and OO calc and both of them prompt me.
Randall
More information about the wxpython-users
mailing list