how to format text for copy-pasting as a spreadsheet table

Nicolas Cueto niconiko at gmail.com
Thu Feb 8 18:11:43 EST 2018


Craig wrote:

> I should be able to paste directly into any spreadsheet.

One would think it should, but long experience copy-pasting from/to LC
confirms "directly" just doesn't work. An intermediary step, such as a text
editor app, is always needed.

Brian wrote:

> If you are talking about getting an actual table,

Yes, that's what I'm after. Not merely a bit of tab- and cr-delimited text,
as Craig exampled, that I can copy-paste into a spreadsheet. But a bit of
text that includes not only the tab/cr-delimited text but also, for
example, indicators to show cell-borders and to centre text within a cell
vertically/horizontally.

I imagine this is somehow possible. Because, as I can do in my 3-step
method, when I copy-paste from a spreasheet doc to a word doc, not only
does the pasted text appear as an actual table but much of the cell
formatting is retained too. However, if I copy-paste that same spreadsheet
data into a text app like Notepad++, then all that appears as far as
formatting is of course the tabs and crs.

And Brian, as always, thank you for the code. I had a look, but I don't
think it achieves my final goal, i.e., getting an actual table. It's code
for cleaning up the formatting, right?

I guess I should just give up...

Thanks anyway.

--
Nicolas Cueto






On 8 February 2018 at 23:40, dunbarx via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Hi.
>
> Not sure I understand. If I make a list:
>
> put "cat" & tab & "dog" & tab & "eel" & return & "red" & tab & "blue" & tab
> & "yellow" into myList
> set the clipBoardData to myList
>
> I should be able to paste directly into any spreadsheet.
>
> There is a thread that describes an issue pasting into google docs,
> depending on the version of LC, but I do not think this ever affected
> Excel.
>
> Craig Newman
>
>
>
>
> --
> Sent from: http://runtime-revolution.278305.n4.nabble.com/
> Revolution-User-f278306.html
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list