Skip to main content
Skip table of contents

Export: Save Data to File

Tag: Export

The Export tag allows you to automate the Export function that generates a file from the content of the grid.



XML
<Export Target="Grid"/>
	<SetParam field="FilePath" value="D:\Automation-export\ExportMainGrid.csv"/>
	<SetParam field="ExportType" value="Text"/>
	<SetParam field="FileOutput" value="Unicode"/>
	<SetParam field="OpenFileOnceGenerated" value="true"/>
</Export>

Tag Attributes

AttributesAttribute ValuesValue DescriptionComment
TargetUser definableThe name of the grid from which contents will be exportedNot Required - If no target attribute is set, the action will default to the main grid

SetParam Options

Fields found in the 'Export to File' dialog

AttributesAttribute ValuesComment
Mode

Create
AppendRows
AppendGrid

AppendRowsBlind

Default
Not available for XML and HTML export
Not available for XML and HTML export
FileOutputASCII
Unicode

N/A

SelectedRowsOnlyTrue / FalseNot Required - Default is True
ExpandAllGroupsTrue / FalseNot Required - Default is False
ChildrenOnlyTrue / FalseNot Required - Default is False
ExportTypeExcel
Excel19972003
Text
HTML
XML

N/A

FilePathUser definableIf no file path is specified, then the resulting file will be created in the same location as the automation file currently being run.
OpenFileOnceGeneratedTrue / FalseDefault is "True"
ExcelSheetNameUser definable

N/A

ExcelTemplateUser definable
IncludeLockedColumnsTrue / FalseDefaults to True (if grid has locked columns)
BytesAsTextTrue / FalseDefaults to False



Detailed Description

The Export function can be automated using the tag Export; content can be pulled from any grid where this function is available.

The attribute Target can be used to identify which grid's content you want to export.

If no attribute is used, or if the attribute/value Target="Grid" is used, the main grid will be exported:
<Export/>

or
<Export Target="Grid"/>

TIPFor product specific grid names see this page.

As stated in the table above, the modes AppendGrid and AppendRows are not available for both the XML (Field="ExportType" Value="XML"), and HTML (Field="ExportType" Value="HTML") export settings.

In these cases the Field="Mode" will be reset to Value="Create".

Product Specific Actions and Functions

consoleEZ

Due to the nature of consoleEZ, it is possible to have multiple grids and consoles open at once. The following attributes area available for you to target the specific grid for exporting its contents.

The following attributes are available solely in consoleEZ (in addition to the standard Export attributes and setParam actions):


AttributesAttribute ValuesValue DescriptionComment
ServerAbbreviated server nameName as found in the 'Select server' list of the 'Open Server' dialogMandatory for Target="LogAnalyzer" or Target="VolumeAnalyzer"
IndexPositive integerConsole window index numberMandatory forTarget="LogAnalyzer" or Target="VolumeAnalyzer"

Example Script

XML
<Load Database="log.nsf" Index="1" Server="WEBTEST/YTRIA" Type="LogAnalyzer">

aclEZ

In addition to the standard Export of the main grid, the action Export ACL Flags and Roles to File, found in the right-click menu of aclEZ, can also be automated.




Two values allow the user to choose between these additional types of exports possible.

AttributesAttribute ValuesValue DescriptionComment
TypeFlagsAndRoles

FlagsAndRolesConsolidated

This will export one column per role

This will export one column for all roles

Required - only one Type value may be set

Example Script

XML
<Export Type="FlagsAndRoles">
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.