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.


image2022-10-24_17-36-54.png


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

Attributes

Attribute Values

Value Description

Comment

Target

User definable

The name of the grid from which contents will be exported

Not 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

Attributes

Attribute Values

Comment

Mode

Create
AppendRows
AppendGrid

AppendRowsBlind

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

FileOutput

ASCII
Unicode

https://www2.ytria.com/icons/ecblank.gif N/A

SelectedRowsOnly

True / False

Not Required - Default is True

ExpandAllGroups

True / False

Not Required - Default is False

ChildrenOnly

True / False

Not Required - Default is False

ExportType

Excel
Excel19972003
Text
HTML
XML

https://www2.ytria.com/icons/ecblank.gif N/A

FilePath

User definable

If no file path is specified, then the resulting file will be created in the same location as the automation file currently being run.

OpenFileOnceGenerated

True / False

Default is "True"

ExcelSheetName

User definable

N/A https://www2.ytria.com/icons/ecblank.gif

ExcelTemplate

User definable


IncludeLockedColumns

True / False

Defaults to True (if grid has locked columns)

BytesAsText

True / False

Defaults 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"/>

TIP

For 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):


Attributes

Attribute Values

Value Description

Comment

Server

Abbreviated server name

Name as found in the 'Select server' list of the 'Open Server' dialog

Mandatory for Target="LogAnalyzer" or Target="VolumeAnalyzer"

Index

Positive integer

Console window index number

Mandatory 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.

v16_5_autom_Grid_Export_Menu_1.gif


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

Attributes

Attribute Values

Value Description

Comment

Type

FlagsAndRoles

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">