Making the clipboard Excel compatible

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Making the clipboard Excel compatible

Tom Glod via use-livecode
Excel doesn't like the line endings that Livecode puts into the clipboardData["text"] and renders the lines as if they were double spaced.

I have asked once before what magic wand to wave to fix the problem, but I forgot the answer and googling was entirely unsuccessful (although I found that there are lots of articles about the strangeness of the Excel clipboard). Can someone remind me?

Michael Lew
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Making the clipboard Excel compatible

Tom Glod via use-livecode
Hmm.

If I place a few lines of text into a field,, with the words separated by
tabs, and:

 set the clipBoardData["text"] to fld 1

and then paste into excel, all comes out just fine. I am in v.6.7, however.

Craig Newman



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Making the clipboard Excel compatible

Tom Glod via use-livecode
In reply to this post by Tom Glod via use-livecode
If I had to guess I'd say that the clipboard contains CRs and LFs for each single line break, and other software is interpreting this as 2 line breaks. Setting the clipboard data ["text"] *decodes* it so to speak. When I copy code and paste it into my email program (Apple Mail) it does the double line thing, but if I paste it first into a text only editor then copy/paste it into my mail program it's fine. That tells me that the text editor is handling the cr/lf condition like you would expect, and Apple Mail isn't.

Bob S


> On Sep 30, 2017, at 23:41 , Michael Julian Lew via use-livecode <[hidden email]> wrote:
>
> Excel doesn't like the line endings that Livecode puts into the clipboardData["text"] and renders the lines as if they were double spaced.
>
> I have asked once before what magic wand to wave to fix the problem, but I forgot the answer and googling was entirely unsuccessful (although I found that there are lots of articles about the strangeness of the Excel clipboard). Can someone remind me?
>
> Michael Lew
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Making the clipboard Excel compatible

Tom Glod via use-livecode
Well and good, but, barring the version difference, the OP was talking about
Excel, and my setup acts normally.

Craig



--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Making the clipboard Excel compatible

Tom Glod via use-livecode
I get double rows in Excel for Mac v2011, OS X V10.12. I still think it's about how the destination application treats CR/LF.

Bob S


> On Oct 2, 2017, at 08:26 , dunbarx via use-livecode <[hidden email]> wrote:
>
> Well and good, but, barring the version difference, the OP was talking about
> Excel, and my setup acts normally.
>
> Craig
>
>
>
> --
> Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Making the clipboard Excel compatible

Tom Glod via use-livecode
In reply to this post by Tom Glod via use-livecode
I'm wondering if this is a Unicode-related thing. No time to experiment
right now however.

Phil Davis


On 10/2/17 7:41 AM, Bob Sneidar via use-livecode wrote:

> If I had to guess I'd say that the clipboard contains CRs and LFs for each single line break, and other software is interpreting this as 2 line breaks. Setting the clipboard data ["text"] *decodes* it so to speak. When I copy code and paste it into my email program (Apple Mail) it does the double line thing, but if I paste it first into a text only editor then copy/paste it into my mail program it's fine. That tells me that the text editor is handling the cr/lf condition like you would expect, and Apple Mail isn't.
>
> Bob S
>
>
>> On Sep 30, 2017, at 23:41 , Michael Julian Lew via use-livecode <[hidden email]> wrote:
>>
>> Excel doesn't like the line endings that Livecode puts into the clipboardData["text"] and renders the lines as if they were double spaced.
>>
>> I have asked once before what magic wand to wave to fix the problem, but I forgot the answer and googling was entirely unsuccessful (although I found that there are lots of articles about the strangeness of the Excel clipboard). Can someone remind me?
>>
>> Michael Lew
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

--
Phil Davis


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode