skip to main content
RDF To Excel Event
The RDF To Excel event takes a RiverWare Data Format (RDF) file and converts the contents to an Excel workbook according to user-specified configuration options.
Note:  This event functions, in part, by automating Excel on your computer; therefore, Excel must also be installed. Since the event automates the installed version of Excel, it does not require a specific version of Excel or Excel workbook format.
RDF Files
RDF files are generated from RiverWare and include data for user-specified slots. Non-series slots can be written to RDF files, but the RDF To Excel event only processes data for series slots. See the “Output Utilities” section of the RiverWare Help for details about the RDF file format.
In the Output tab of the MRM Configuration dialog box, you can configure slot data for a multiple run in RiverWare to be output to an RDF file.
Excel Workbook
When the RDF To Excel event writes an RDF file to an Excel workbook, it creates a worksheet named “Header”, followed by worksheets containing the slot data. These are discussed in the following sections.
Header Sheet
The Header sheet summarizes RDF file information that is not slot data, including the following:
• File name
• Owner
• Description
• Creation Date
• Number of Runs
• Number of Slots
• Number of Timesteps
• Information for Each Run
• Information for Each Slot
• Listing of the Timestep Dates
Data Sheet Layout
The data sheet layout is determined by the user-selected workbook orientation option. The three workbook dimensions—rows, columns, and worksheets—can be mapped to the three data dimensions—timesteps, slots, and runs, allowing for six possible workbook orientations. The following orientations are common:
• Each run is a sheet; each timestep is a row; each slot is a column
• Each slot is a sheet; each timestep is a row; each run is a column
In the second orientation, each sheet tab is labeled with the slot name; each row header includes the timestep label; each column header includes the run label; and the table cells include the corresponding timestep data as indicated by the header labels and sheet name.
Slot Names
Because RiverWare slot names can be long, it can be challenging to fit them into the workbook, particularly for sheet tab labels, which are limited to 31 characters. The RDF To Excel event provides the following options for writing slot names to the workbook.
Slot Index Labels
Slot index labels are Slot0, Slot1, Slot2, and so on The index labels are mapped to the full slot names on the Header sheet, and the index labels are used on the data sheets.
Full Slot Name; truncated, if necessary
The full slot names—Object.Slot—are used. The following adjustments are made when slot names are used on sheet tabs.
• The complete Object.Slot name is inserted into the first cell (A1) of the sheet, to aid in identification.
• Colons are removed because they are not legal characters on tabs.
• Because only 31 characters are allowed on tabs, the name is truncated at 30 characters and a tilde character (~) is added to the end to indicate it is truncated. If the truncated name is not unique, a sequential number is prepended to the name.
Automatically Shortened Slot Names
Slot names are automatically shortened according to the following criteria.
• The string “And” is replaced with “&”.
• Colons and spaces are removed.
• All lowercase vowels are removed.
For example, PowellStorage becomes PwllStrg.
When used on sheet tabs, if a shortened name still exceeds 31 characters, the name is truncated at 30 characters and a tilde character (~) is added to the end to indicate it is truncated. If the truncated name is not unique, a sequential number is prepended to the name.
RDF To Excel Configuration Dialog Box
This dialog box opens when you open an RDF To Excel event on the RiverSMART workspace.
Note:  The source RDF file and result annual RDF file are configured in the program calling the event; therefore they are not included in this dialog box.
Workbook Orientation
This menu includes options for mapping Excel workbook rows, columns, and worksheets to the RDF file timesteps, runs, and slots. The following figure shows the available options.
Slot Labels for Sheet Tabs
This area of the dialog box is displayed only if the selected Workbook Orientation option maps slots to worksheets. You can select the slot naming option to use for the sheet tabs; see Slot Names for details.
Use Automatically Shortened Slot Names in Result Data Sheets
This check box is displayed if the selected Workbook Orientation option does not map slots to worksheets.
• If you select the check box, automatically shortened slot names are used in columns or row headers, depending on the specific orientation. Even when there is no strict limit on number of characters allowed, shortened names may be useful because they allow you to identify slots when columns are narrow.
• If you clear the check box, the full slot name—Object.Slot—is used in headers.
Revised: 01/10/2022