Use the Export Data dialog box to select the options you want to use when exporting model data to a linked Excel file. For more information, see Setting Up Export Links.
To open the Export Data dialog box, choose Export Data from the Model menu.
Each link is shown in a separate row. Use the button to add a new link. Then, use the columns to set up information about the link. To remove a link, click on the number of the link you want to remove, and then click on the button.
This column indicates whether the destination you've specified exists and can be read. It will say No until you select a destination, and will also say No if you have an existing link, but the file is missing or unreadable.
This specifies the file to which the software will write the data. Click on this field to open a File Selection dialog and choose a file. If the file can't be used, most commonly because all its worksheets are already specified for importing or exporting data, an error message will appear.
Note: The file should be located in the same directory as the model, or a subdirectory of the model directory, named data. If you use a file from a different location, copying the model to a different computer will likely make the link invalid.
This option is only applicable to Excel files. After you've selected the file, the first worksheet it contains will be shown. Click on the name of the sheet to enable the dropdown list . Then, click on the name of the worksheet to select the worksheet you want.
Note: You can only choose worksheets not already in use by other import or export links. If there's a single worksheet available, it will be chosen and no dropdown list will be shown.
Check this option to enable the link for Export All on this dialog, and for automatic import after any change if Dynamic is checked.
Check this option to have the specified link be executed when the model is run.
Select the data source from the dropdown. The choices are:
- All Model Variables to export everything in the model.
- Parameter Values to export all constants and the y values of graphicals. The resulting file or sheet can then be imported to repeat settings from the current run.
- Table Names will list any tables that you've marked for export (see Table Properties) using the names you've specified. Select a table to export its contents.
This specifies the orientation of the destination data. If Vertical is selected, then variable names will appear along a row with the associated values directly underneath them. If Horizontal is selected, then variable names will appear in a column with the associated values to their right. This option isn't available for tables; tables use the orientation of the table.
This specifies the frequency with which you want to export the data. Type in a number to export with that frequency, or one of the following (as you begin to type, the choices will appear):
- Every DT will export values every DT, which is to say, everything.
- Use Table Settings will export the content as it appears in the table. This is only applicable when you've chosen a table.
- Current Time will export values for the current time only. Instead of a series of numbers, you'll get a single number for every variable. Time (labeled by the units you've set for it) will be included in the output.
- One Set of Values will export values for the current time only, and any arrays will be exported in full rows. If you choose this option for a table, the variables appearing in the table will all have all elements exported. Time will not be included in the output.
Click on the button to export to the designated link. The export will be attempted regardless of the Enabled and Dynamic settings. A message will be shown about the success of, or problems with, the export.
Click this button to export to all of the links that are marked enabled. This will happen whether the links are marked dynamic or not. A message will be displayed showing the results of all the exports. If you have many links, this is a convenient way to check that they're all working as expected.
Note: "Export all" exports from the most recently made run. If you haven't made a run, names will be exported, but no values will be.
Click OK to save the changes you've made to links. Click Cancel to discard them.