Follow the steps below to create an Excel 2007 document with a page header, a title, and column headings. The input RowSet data being used is based on the example illustrated in the
RowSet topic.
From within the Project Designer page, expand the Data Translation folder in the Component Library, and then drag the Write Excel task to the Project Outline.
On the Basic tab of the Write Excel task, specify values for the following attributes:
Input RowSet Variable
The name of a variable of type RowSet which contains the source data.
Output File
The
file path and file name of the Excel document to write to.
Excel Format
The Excel document format, either Excel 2007 or Excel 2003.
On the Advanced tab of the Write Excel task, specify the Include Column Headings value:
Include Column Headings
Whether or not to include column headings in the generated Excel document.
Click the
Add
button in the sub-menu and select the Specify Page Header menu item.
On the Basic tab of the Page Header element, specify values for the following:
Left Section
The text that should be displayed in the left section. You can insert page number, number of pages, date, time etc. by using the appropriate variable names listed in the options drop-down.
Right Section
The text that should be displayed in the right section.
Right-click the Write Excel Task in the Project Outline on the left side of the page and select the Specify Title menu item.
On the Basic tab of the Title element, specify the Title Text value:
Title Text
The title text.
On the Cell Format tab of the Title element, specify the values for the following attributes:
Background Color
The background color for the title cell.
Underline
Option to underline the title text.
Right-click the Write Excel task in the Project Outline on the left side of the page and select the Specify Column Headings menu item.
On the Basic tab for the Column Headings element, specify the Row Number value:
Row Number
The row number where the column headings should appear.
On the Format tab of the Column Headings element, specify the Bold value:
Bold
The font weight of the Column Headings.
Right-click the Write Excel task in the Project Outline on the left side of the page and select the Specify Data Options menu item.
Click the
Add
button, and then click
Add Column
to add an element to the Write Excel Task.
On the Basic tab of the Column element, specify the Index value of the column (to perform a type conversion):
On the Type Conversion tab of the Column element , specify the following attributes:
Type
The data type of this column. Use the value NUMERIC to convert the currency amounts into a standard number as per the example parameter above.