Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual

Page 269

Advertising
background image

9

ReportsPlus

269

Excel Object

The Excel object provides the capability to create Excel reports via the MPR scripting
capability. This functionality is based on utilizing an existing Excel spreadsheet with
formatting, trends and charts already defined, and then using the script to populate the
spreadsheet with data from FactoryTalk EnergyMetrix.

Instancing

The Excel object is not a creatable object.

Accessing

The Excel object is accessible from a MPR script via the Report global variable.

Properties

Methods

Workbook Object

The Workbook object is used as the main reference to the workbook that the script works
with.

Instancing

The Workbook object is not a creatable object. For the MPR Excel reporting function, the
system expects an Excel workbook with the same name as the script to be located on the
Factory Talk EnergyMetrix server on the ExcelTemplates share/folder.

Property

R/W

Description

Workbook as XLWorkbook

R/W

The workbook to work on within the MPR Excel
report

Method

Description

SetCell
(worksheetName As
String, row As
Integer|String, col
As Integer|String,
value as
String|Double)

Fill a cell in the worksheet with a string or number value. The cell can
be defined either by row and column numbers or by row and column
string identifiers.

SetCell
(worksheetName As
String, namedRange
As String, value As
String|Double)

Fill a cell in the worksheet with a string or number value. The cell is
defined by a named range string.

SetCell
(worksheetName As
String, row As
Integer|String,

Fill a multiple cells in the worksheet with a meter tag data. The
starting cell can be defined either by row and column numbers or by
row and column string identifiers.

Advertising