Import Expressions from Excel

Use this option in conjunction with the Export to Excel option to import large amounts of data into WEAP from a previously saved Excel template spreadsheet. Each row of the spreadsheet refers to the data associated with one branch/variable/scenario combination.  Note: This option can only modify data for existing branches -- you cannot use it to add new branches to WEAP.

Before using this option you must have created and opened a spreadsheet in Excel containing the data you wish to import. This spreadsheet must be strictly formatted with the names of branches, scenarios and variables as the rows of the spreadsheet. The only practical way to create such a spreadsheet is to first use the Export to Excel option.

Once you have exported this template, you can use standard Excel functions (fill, copy/paste, and making equations to link to other cells) to fill in the expressions with the correct values. When you import, the text from the Excel cell for every expression in the worksheet will overwrite the corresponding expression in WEAP. WEAP will not create a link to the Excel worksheet.

Tips:

  1. Which Sheet is Imported? WEAP always imports from the active worksheet of the current open Excel spreadsheet.

  2. Importing Scaling Factors and Units: When importing data, WEAP will also import and update the scale and units associated with key assumptions and demand annual activity levels. Thus, you can use Excel to edit both data and also units. This can be particularly useful if you wish to change the scale or units of many branches at the same time (e.g. if changing the currency unit for a whole study). All you need to do is (1) export a variable from WEAP to Excel, (2) change the units by copying and pasting ranges of cells in Excel, then (3) re-import the spreadsheet. Note however that in WEAP, scaling factors and units apply across Current Accounts  and all scenarios. Hence WEAP will only import changes to scaling factors and units specified for Current Accounts. Any edits made to scaling factors and units for other scenarios will be ignored.  This also works for variables whose units have denominators, for example, importing transmission link Maximum Flow Volume, which has units volume/time, such as ft^3/s or Million gallons/day.

  3. Importing from Filtered Excel Spreadsheets: By default, WEAP's export option will set up a spreadsheet that can be easily filtered to show only selected branches, variables, or scenarios. You can use the auto-filter buttons in the spreadsheet to selectively hide rows of the spreadsheet. However, when importing, WEAP will import data from all rows of the spreadsheet, whether they are visible or not.

  4. Resetting to Inherited Expressions: To reset many expressions in a scenario to the ones used in the parent scenario, first export the scenario to Excel, then in the spreadsheet blank out the expressions you wish to reset (but do not delete the row of the spreadsheet), then import the sheet back into WEAP.

  5. How the Import option works: In order to work correctly, the import function needs to match-up the rows in the spreadsheet with the data stored in WEAP for a given branch, variable and scenario. It is important to understand that during the import WEAP does NOT make use of the names stored in the branch, variable and scenario columns. Instead it makes use of 3 hidden columns in the spreadsheet (columns A-C) that contain unique the ID codes used for these items in WEAP. Please bear these warnings in mind: