Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual
Page 277
9
•
ReportsPlus
277
Column Object
The Column object presents a column within a worksheet of the workbook that the MPR
Excel script is working with.
Instancing
The Column object is not a creatable object.
The Workbook object automatically creates Column objects for each worksheet in the
workbook (accessible using the Excel.Workbook.Worksheets.Columns property) and
MPR Excel script code can access any column in a worksheet using the Column objects.
Methods
Create an MPR Excel report
Creating an Excel report is very similar to the process for creating a standard multi-
purpose report.
The process is based on starting by creating a formatted Microsoft Excel workbook, to
hold the data and content from the FactoryTalk EnergyMetrix database. Then that Excel
file is saved onto the ExcelTemplates share/folder on the FactoryTalk EnergyMetrix
server, and a MPR script is created for that Excel template.
The main difference from a standard multi-purpose report is, that:
The Use Excel Template file setting is checked,
The script is named the same name as the Excel template file
The code in the script is based on working with the Excel model as opposed to the
standard Report model.
The rest of the process of configuring the Report object and running it is the same as with
the standard multi-purpose report, with the main difference, that the output is a Microsoft
Excel 2007/2010 XML format. Instead of the report automatically shows up, the user will
be asked to download an attachment from the browser instead.
Method
Description
InsertColumnsBefore
(NumberOfColumns As
Integer)
Insert a number of columns before the columns in the
range
InsertColumnsAfter
(NumberOfColumns As
Integer)
Insert a number of columns after the columns in the
range
Delete()
Deletes the column