Jump to content
Macro Express Forums

Strange behaviour when copying from Excel to other app


blopib

Recommended Posts

We have experienced some trouble when copying from Excel to another application. When copying data from excel it eg. looks like this in the cell R27 DT71D4 in the excelsheet, but when it writes it out in the application it looks like this R27 Dt71D4 (a lowercase letter somewhere in the middle), it's can be randomly placed. I don't know what to think, I can't see that it should have something to do with timeing issues in ME, I don't know if it has something to do with ME at all or if it's something with the other application. Doesn't ME copy the ASCII code? If so it definitely should be a uppercase letter there.

Someone who has a clue, why this is?

 

Oh, have to run, time to go home :)

Link to comment
Share on other sites

Doesn't ME copy the ASCII code? If so it definitely should be a uppercase letter there.

That all depends. Macro Express asks Windows for the content of the clipboard. It does not alter the information it receives in any way.

 

I do not know specifically what is happening in this case but I have seen cases where an application stores information in mixed case and displays it in all upper case. I have also been surprised when some MS Office applications change what is placed on the clipboard to something you don't expect. However, the problems I have see relate to carriage returns and line feeds (newlines), not the case of a string.

 

In short here is what happens:

  1. The application gives something to Windows to place on the clipboard.
  2. Macro Express asks Windows for the information on the clipboard.
  3. The macro uses the information as Macro Express received it. No changes are made.

Link to comment
Share on other sites

I have seen cases where an application stores information in mixed case and displays it in all upper case.

 

I copy the data from Excel to a Oracle-based application and in some fields it's not allowed to write with lowcase letters, it automatically turns to uppercase letters. But in this field for designation it's ok to write both kinds.

 

I'll put this in mind and try to figure out if it happens in some special situation, but I doubt that it's something that I can affect.

Thanks Kevin for the answer anyway.

Link to comment
Share on other sites

I discovered the person whose computer had the "problem" had changed the keyboard stroke for that key

 

Thanks for the tip, but in this case I don't think it has something to do with my problem, my macro copies the data from Excel and writes it to this other application, and the data is right in Excel but it turns out wrong in this other appl. and when it happens (it's seldom) it just happens randomly.

Link to comment
Share on other sites

Copy the text t your clipboard and paste it into a hex editor and see what the actual character codes are. Then copy to a text variable in ME and see if it changes. My guess is that the source system is all uppercase and will display both lower case and upper case characters as upper case. But when copied and pasted into another environment you may see they're actually different. I know MRP systems and various terminal based applications can have this problem.

 

If you want them to always be upper case just convert the case on of the lower case characters in the macro.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...