Jump to content

spreadsheet copy/paste problem


Recommended Posts

Hi all,

I've prepared a little workflow for a boring job to do.

we have to prepare a list of names and surnames from a bunch of different sources(sheets,docs,text files,mails, etc.)

the workflow is simple but useful, it has a list keywords entries, and each of them calls a different little php script that takes the text on the clipboard and converts it passing it to a 'Copy to Clipboard' element that pastes it again. I am also attaching Hotkey triggers to the most used functions.

 

so I can copy and convert on the fly I.E. 'John Doe', 'Doe John', 'Doe, John' and other combinations and  have it pasted as 'JohnTABDoe', with the TAB I have it pasted on a excel sheet on two columns with name separated by surname.

 

Now I have a problem when the text is copied from a sheet calc in Libre Office or Open Office:

 

if the text inside the cell is SELECTED and then copied, then the paste is handled as usual and it's OK.

but if I select simply the cell and copy and then call the script, then all the process seems to be ignored and it's the original cell to be pasted...

the text seems to be copied and treated fine, because on other apps is pasted without problems, but inside Office,

is like in that case the 'Copy to Clipboard' with automatic paste on front most app is ignored

 

is this normal behaviour, and there's a workaround?

 

Hope the question was clear

 

thanks,

 

     Giulio

 

Link to comment

Hi all,

I've prepared a little workflow for a boring job to do.

we have to prepare a list of names and surnames from a bunch of different sources(sheets,docs,text files,mails, etc.)

the workflow is simple but useful, it has a list keywords entries, and each of them calls a different little php script that takes the text on the clipboard and converts it passing it to a 'Copy to Clipboard' element that pastes it again. I am also attaching Hotkey triggers to the most used functions.

 

so I can copy and convert on the fly I.E. 'John Doe', 'Doe John', 'Doe, John' and other combinations and  have it pasted as 'JohnTABDoe', with the TAB I have it pasted on a excel sheet on two columns with name separated by surname.

 

Now I have a problem when the text is copied from a sheet calc in Libre Office or Open Office:

 

if the text inside the cell is SELECTED and then copied, then the paste is handled as usual and it's OK.

but if I select simply the cell and copy and then call the script, then all the process seems to be ignored and it's the original cell to be pasted...

the text seems to be copied and treated fine, because on other apps is pasted without problems, but inside Office,

is like in that case the 'Copy to Clipboard' with automatic paste on front most app is ignored

 

is this normal behaviour, and there's a workaround?

 

Hope the question was clear

 

thanks,

 

     Giulio

 

I can't provide exact answers to your questions, as there are a number of reasons you may not be seeing the behaviour you expect, but there are two things that come to mind.

 

First, have you considered whether this can be done using a .csv or .txt file? Text is much easier to manipulate predictably than in a spreadsheet. It can then be turned into a spreadsheet again later.

 

Secondly, if you're using a variety of different applications, you'll notice that they don't all behave the same so it's tricky to predict how each native or non-native app will behave when attempting to copy or paste something. Hence the suggestion above of processing your entries in as plain text a format as you can, especially for what you paste in.

 

Cheers and good luck :)

Vero

Link to comment

Hi Vero,

thank you for your kind answer   :)

 

You are right, that's a specific copy - paste problem  that is specific for the spreadsheet app.

 

I have seen this simplifying the the tests and trying the simplest thing: Strip clipboard text formatting, the workflow by David Staron that only launches the pbpaste command and sends it to the clipboard.

the result is the same, if I copy a formatted cell and use strpaste on another cell, the pasted text is not stripped of its formatting, both in OpenOffice and LibreOffice.

quite interesting, and a possible workaround sometimes, if I select a cell and copy a formatted text in LibreOffice and use strpaste on a OpenOffic cell the command works, and the text is stripped, and vice-versa... and also my text adjusting workflow works as expected...

 

thanks again for your answer,

 

     Giulio

 

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...