Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

    On the Web:
    Source Code:

This Windows JScript program:
    1) Extracts current price quotes from a CSV file on the web such as a
       Google Spreadsheet and/or the web interface.
    If /automate is specified as an argument:
    2) starts Quicken (if not already started - but this is not reliable)
    3) sends keys to import the prices using Quicken's Import Prices command.
      If Quicken file is protected with Password, the automation will not work
      unless Quicken is started and the password entered before running
      this script.

    Downloaded prices are stored in file QImportP.csv, in the directory
    %TMP% or %TEMP%, or C:\WINDOWS\TEMP, whichever setting is found first.

Usage: QImportP.wsf [/automate] [/gcsv:google-spreadsheet-download-url]
                    [/v:verbose-level] [/dmy:date-format] [/symonly] [/help]
                    Google Spreadsheet has stale price data for mutual funds.
                    Maybe 4 days old in many cases.

                    Using gets more current prices:
                    /avkey:your-key /s:symbols [/days:number-of-days] [/div:divide-by]


automate   : Import prices into Quicken. If necessary, tries starting Quicken.
gcsv       : Google Spreadsheet download-as-CSV URL
             /gcsv: option does not use the /s or /div or /days option shown below.
             It downloads all ticker symbols stored at the URL.

dmy        : Output date format. Characters DMY are replaced with date values 
             (Default M/D/Y will convert 1st Aug 2017 to 08/01/2017)
             (further examples /dmy:D/M/Y will give 01/08/2017 and /dmy:Y-M-D will give 2017-08-01) 
symonly    : Ignore the exchange part of symbol in output (eg. Output LON:LLOY as LLOY)
             (The symbol in the QImportP output must match the value defined in Quicken
              - eg. if you have LON:LLOY in the file, edit the value in Quicken
                    using /symonly, ensure only the value LLOY is specified in Quicken)

avkey      : Your personal AlphaVantage key. See their doc:
s          : List of comma-separated symbols for pricing (symbols in format)
             Note: prefix symbol with "!" to ignore /div setting for that symbol
days       : Number of days history to retrieve (default = 0, latest price only)
             Note that only /avkey and /s API supports historical quotes, /gcsv does not.
div        : Divide amounts by value, for converting pence into pounds, or any other division
             if the symbol is prefixed by "!", the /div conversion will be ignored for that symbol

help       : /? or /h or /help - Print usage description

   Example: cscript QImportP.wsf /gcsv:"" /symonly /automate

   Example spreadsheet:
     Make a copy of that spreadsheet, make it shared, allow "Anyone to view with a link", and then
     change the URL in this manner to get the download URL:
     Change the final /edit?... to /export?format=csv as shown below for the example spreadsheet:"

    The following examples require using AlphaVantage: and
    using this argument in all the calls below:

    cscript QImportP.wsf ... /s:"CSCO,GE,FMAGX,VFINX" /noget
       Will do nothing.

    cscript QImportP.wsf ... /s:"CSCO,GE,FMAGX,VFINX" /noget /automate
       Will not get any prices, but will use existing QImportP.csv
       file, and start up quicken, and use Windows SendKeys automation
       to import that file into the Quicken Portfolio View.

    cscript QImportP.wsf ... /s:"CSCO,GE,FMAGX,VFINX" /automate
       Will get prices for above list, latest prices only.
       Downloaded prices are stored in QImportP.csv
       Will start up quicken, and use Windows SendKeys automation
       to import that file into the Quicken Portfolio View.
	cscript QImportP.wsf /s:"CSCO,GE,!FMAGX,VFINX" /automate /days:7 /dateformat:D-M-Y /div:100
       Will get prices for above list, with 7 days history.
       Downloaded prices are stored in QImportP.csv where the prices will show as price/100 except for FMAGX which will have no division
	     and the date format will show as dd-mm-yyy
       Will start up quicken, and use Windows SendKeys automation
       to import that file into the Quicken Portfolio View.
    This program has to be run in a Windows Console terminal,
    or a short-cut can be manually created to run with required arguments.

  QImportP.cmd.txt :
    Edit this example script to call QImportP.wsf with the list of symbols,
    whether to run automation, any other arguments, etc. Rename your copy
    to QImportP.cmd
    Then copy both QImportP.wsf and QImportP.cmd to a folder
    from where you are going to run the script.

    Running "QImportP" will then run the cmd script.

  Automation :
    As mentioned above, the script accepts a /automate argument. This can
    be used to make the script import the prices directly into Quicken.
    This is a fragile mechanism, here are all the things to try if
    it is not working:

    1) On startup, Quicken must open up with the correct file. Quicken
    will start by opening the file that was used last time it was closed,
    so ensure that the correct file will be opened.

    2) If you have password-enabled your Quicken file, run Quicken first,
    enter your password, and then run this QImportP script with /automate.
    It is not possible or useful to have this script run Quicken in this

    3) Caps-Lock key should be off.

    4) Do not press any keys while the script is running. It takes
    around 8 seconds to complete the automation work. This can be speeded
    up by removing the delays inserted in the code if needed, but
    given that around 8 key sequences are sent, this allows the user to
    follow Quicken action on the screen in response to the keys. 

Adding a menu short-cut

This method works on Windows XP as well as Vista, and is a better way
to automate the script rather than depending on the script to start Quicken.

First: create a customized QImportP.cmd file, and copy that and the
  QImportP.wsf to a specific folder. Test that running QImportP.cmd from any
  folder works correctly.
  Create the QImport.cmd script using the example QImportP.cmd.txt file.

Second: Using Explorer, open the folder, and drag-and-drop the QImport.cmd
  file onto the start menu - this will create a custom menu link.

Enable drag and drop operation to add custom menu links to Start Menu.
Note that drag-and-drop should be enabled for this to work, here are the
steps to do that if that does not work.

Right Click on "Start" Menu
Click "Properties"
Click "Start Menu" Radio Button
Click on "Customize" Button
Click on "Advanced" Tab
If the "Enable dragging and dropping" Checkbox is not checked, drag-and-drop
will not work.
Click "Enable dragging and dropping" Checkbox.  Click "Ok" and then "Apply".

Adding a button on the Quicken Toolbar

[This works for Windows XP and Vista. The above section showing how to add
 the QImportP.cmd to the Start menu is an alternative, avoids editing
 .ini files which can be dangerous.]

If you are not starting "Quicken Home Inventory" or "Quicken Family Lawyer"
from within Quicken, you can use one of these to start QImportP process.
This has been tested for Quicken 2006.

First: create a customized QImportP.cmd file, and copy that the
  QImportP.wsf to a specific folder. Test that running QImportP.cmd from any
  folder works correctly.

Second: edit QUICKEN.INI
  Assuming "Quicken Family Lawyer" is what can be used to start QImportP,
  find your Quicken.ini, and edit it.
  IMPORTANT: back up your Quicken.ini in case of problems editing.

  In Vista, the file may be here:

  Find the line with AddApps, add ";QFL" to it, like this, if not
  already present:

  Then at the end of the file, add a QFL section:
MenuString=Quicken Family LawyerX
; use IntuitID=1007 for QHI, and IntuitID=1023 for QFL

  The ExeName should be the full pathname to your working QImportP.cmd script.
---- more detail ----
MenuString=Quicken Family Lawyer
WinTitle=Family Lawyer 
; names QHI or QFL can be anything, only the IntuitID matters
; it is 1007 for QHI, and 1023 for QFL
; and the ExeName is what will be invoked when command is run
; need ExeName, MenuString (anything in it) and IntuitID=1023 in QFL section
; Don't need: IsGlobal=TRUE ;WinTitle=XFamily Lawyer ;ModuleName=QFL
; must have .exe or .cmd file name ending, can't use .bat suffix
; InformExec=FALSE or TRUE, .bat file still has same error 
; "Failed to start program C:...\QimportP.bat. This program may not be correctly installed."
; InformExec=FALSE or TRUE for .cmd, works with no Quicken error.
; When InformExec line is not present or is FALSE, Quicken flashes the
; "Command Prompt" DOS window where the script commands execute, so better
; to keep it TRUE.

Third: update Quicken, add a toolbar icon for QImportP.
  Start Quicken, run the Edit -> Customize Toolbar command.
  Check the "Show all choices" box in the "Add to toolbar" section.
  Select "Quicken Family Lawyer" from the choices, and click on the "Add->"
  button. Now this item will show up in the Current Toolbar Order section.
  Select the "Quicken Family Lawyer" in this section, and click
  on the "Edit Icons" button.
  This will allow replacing the icon text, make it "QImportP". 
  Click on "OK" button to dismiss the window, when all done.

Note that the menu command "Property & Debt" will still show this
new command with the old name "Quicken Family Lawyer". But the toolbar
text may show the name typed in the previous step.
Copyright (c) 2009-2010,2015,2017
No Rights Reserved.
Placed into Public Domain.
May have calls into external web APIs, which will have 
their own terms of use.


Import Prices Script for Quicken 2006




No releases published


No packages published