On 5-4-2015 16:38, Tom Davies wrote:
Hi :)
Sorry no-one has been able to reply so far!  I think the Devs mailing list
or irc (or whatever) channel might be more useful!
Regards from
Tom :)



On 3 April 2015 at 14:03, vighnaharmone <[email protected]> wrote:

Hi,
I had just started to use Libre.
I want to paste contains of clipboard in "Calc" using c#.net code
I tried using XSheetPastable but I am not getting any example for using
XSheetPastable.

Can some body help me how the code should be?

Thanks in advance for your Help.
From
Vighnahar Mone


The easiest way (but not the most beautiful way) to do it seems to be:


        private void button1_Click(object sender, EventArgs e)
        {
            var prc = Process.GetProcessesByName("soffice.bin");
            if (prc.Length > 0)
            {
                SetForegroundWindow(prc[0].MainWindowHandle);
                SendKeys.Send("{F5}^AB{TAB}2{ENTER}abc{ENTER}{F5}");
            }
        }


This code puts the text "abc" i field "B2"

more info here:
https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=vs.110).aspx



--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to