Results 1 to 8 of 8

How to pass a parameter from PowerShell to Excel

Threaded View

MikeSD How to pass a parameter from... 04-30-2021, 11:06 AM
Bernie Deitrick Re: How to pass a parameter... 04-30-2021, 11:35 AM
MikeSD Re: How to pass a parameter... 04-30-2021, 12:39 PM
Bernie Deitrick Re: How to pass a parameter... 04-30-2021, 01:20 PM
MikeSD Re: How to pass a parameter... 04-30-2021, 01:55 PM
  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    28

    How to pass a parameter from PowerShell to Excel

    I have an excel macro-enabled worksheet that I am using. Excel is primarily being used to store all the macros and VBA scripts, to process another file (CSV). That CSV fileName is currently hardcoded into an Excel variable, for test. The fileName will not be known at runtime. It's being generated by a PowerSheet script, which will then open the Excel file.

    I need to open that worksheet from a PowerShell script and pass the (CSV) fileName parameter to the Excel worksheet. I can open the Excel worksheet just fine, and because the test fileName is hardcoded, for test, that works too. But I need to have the PowerShell script pass a fileName parameter to Excel, so the file doesn't have to be hardcoded.

    What is the easiest way to do that?
    Last edited by MikeSD; 04-30-2021 at 09:50 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hyperlink to local Excel document and pass parameter
    By antoineburdett in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2018, 08:50 AM
  2. Replies: 2
    Last Post: 10-06-2014, 08:15 AM
  3. Replies: 0
    Last Post: 10-06-2014, 07:35 AM
  4. Replies: 2
    Last Post: 06-17-2012, 03:13 PM
  5. how to pass parameter to different sub?
    By ccs_1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2008, 12:58 PM
  6. PASS down parameter from DOS to Excel
    By brucelim80 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2007, 07:08 PM
  7. Pass down parameter from Web
    By brucelim80 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2006, 09:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1