Getting handle on open excel window

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 5 months ago.

  • Author
    Posts
  • #5566

    by perryworld at 2013-02-18 14:53:29

    Hi,

    Hope you can help – we are totally new to PowerShell.
    We have automated accessing our website and are able to move between pages and save some reports as PDF's but we are struggling with our next process.
    As part of our web page when we click on the excel anchor we produce the reports in excel, this opens a new excel window – is it possible to get a handle on this new window and close it.

    Any help would really be appreciated

    Thanks
    Richard

    by DonJ at 2013-02-19 04:56:24

    Just use Stop-Process to stop the process named Excel (or whatever).

    by perryworld at 2013-02-23 15:17:56

    Thnaks DonJ – that worked a treat.
    Another question, as part of our process we open a new tab which contains a printer friendly version of our report but then when we try to print the page it still has focus on the originating page and not the newly created page. How would we get a handle on the new page so we can print it and then close it.

    Any help appreciated

    Thanks
    Richard

You must be logged in to reply to this topic.