Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send CTRL-S, then CTRL-X to Open Excel File
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01429515
Message ID:
01429599
Vues:
29
>Using C#.
>
>I need to send these keystrokes to an open excel file. I have searched Google from one end to the other, and I can't seem to find a coherent example.
>
>Can someone show me how to do this?

By 'open excel file' do you mean an instance of Excel that is open on the desktop or an oledb connection?

If the former (and the Excel app has focus) you can use the System.Windows.Forms.SendKeys class:
SendKeys.Send("^S^X")
If it doesn't have focus you might basing a solution on this class (I haven't):http://www.codeproject.com/KB/cs/SendKeys.aspx
HTH,
Viv
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform