As an alternative to using the DeltaV Reporter worksheet function dialogs, you can enter the formula for a worksheet function directly into a cell in an Excel worksheet. The following sections provide procedures for entering a formula directly, including a tip about how to use a cell reference to enter a large number of columns when the number of characters in the formula exceeds length limitations imposed by Excel.
When entering a formula directly, first select a single cell or an appropriately dimensioned array of cells for the expected results. Press Enter for a single cell formula; press Ctrl+Shift+Enter for an array formula. In the case of an array formula, Excel encloses the formula in braces, { }, in the formula bar to indicate that it is an array formula.
To type a formula to enter a single historical value into a worksheet
For example:
=DvCHValue("localhost","FIC-101.PV",FALSE,"Value","Local",0,"10/15/04 11:30:45 AM")
The Continuous Historian database is queried and the cell shows the results of the formula calculated with the supplied arguments.
To type a formula to enter an array of historical data into a worksheet
For example, in a 1R x 2C range, type:
=DvCHIntervals("localhost","FIC-101.PV",FALSE,"Minimum Value;Minimum Timestamp","Local","10/15/04 2:15:00 PM","10/16/04 2:15:00 PM","30minutes")
Note The formula as displayed in the formula bar is enclosed in braces, { }. This is Excel's indication that it is an array formula.
It may be necessary to resize the column width to present the data more clearly.
Note that any formula you enter using these techniques can still be edited using the appropriate worksheet function dialog (invoked using the Edit Function menu option). This can be a useful way to set the correct range for your formula, using the dialog's "Adjust selection to accommodate results (if necessary)" option.
When entering an array formula, if you are using a large number of columns, it may be useful to enter the columns argument into another cell and then refer to the cell (for example, A1) in the formula text instead of typing all the column names directly into the formula. It may be necessary to do this, because Excel imposes various limits on the length of formulas and array functions.
Hint To eliminate the need to type all the columns into the reference cell, you can choose the option to Insert the formula as text and then copy and paste the column names into the reference cell. Then you can create a new formula with one column and substitute the reference cell name (such as A1, without quotation marks) for the column name.
To use a cell reference for a large number of columns
If you used a cell reference for the columns, the columns will show correctly in the configure dialog if you select Edit Function. As long as you don't actually edit the columns, clicking OK in the configure dialog will cause the modified function to be inserted still using the cell reference.
For more information about worksheet functions, refer to Using the Worksheet Function Dialogs in Books Online.