SendMessage isn't a good choice because it's synchronous so if the target app is hung, your app will hang. SendMessageTimeout would be a better choice.

Unfortunately, it still won't work in this case where you are doing a select all/copy to the clipboard.

If you want to do this, you'll need to set focus on the target application (SetForegroundWindow) and then use SendInput as Victor suggested.

An alternative to this is to use Excell's automation model to connect to the active Excell instance and access the work book from there.

If you can give more specifics on what you are actually trying to do, then we might be able to offer additional alternatives.