Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send CTRL-S, then CTRL-X to Open Excel File
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01429515
Message ID:
01429599
Views:
30
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform