Kentico CMS 7.0 Developer's Guide

Advanced export

Advanced export

Previous topic Next topic Mail us feedback on this topic!  

Advanced export

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Clicking the advancedexport Advanced export option can raise two different versions of the Advanced export dialog, depending on the type of user performing the operation.

 

devguide_clip1684

 

Advanced export - global administrator

 

When the advancedexport Advanced export option is selected by a global administrator, the dialog depicted in the following screenshot is displayed.

 

devguide_clip1676

 

The following options can be adjusted in the dialog:

 

Export to

Type of file to which the data will be exported. You can choose from the following:

 

Excel - exports data to an XLSX spreadsheet.

CSV - exports data to a CSV file.

XML - exports data to an XML file.

Delimiter

Displayed only when export to CSV is selected. Determines the value separation character used by the CSV file. The character can either be a comma (,) or a semicolon (;). See the CSV delimiters topic for more details.

Export raw database data

The format of data displayed in listings is not always identical to actual data stored in respective database columns. E.g. the Enabled column in user listing shows Yes/No values, while boolean True/False values are actually stored in the UserEnabled column of the CMS_User table.

 

With this option enabled, raw data will be exported exactly as stored in the database and column headers will be identical to the database column names. If disabled, column headers and the actual data will be exported as shown in the listing.

Current page only

If enabled, only records displayed on the current page of the listing will be exported. If disabled, all records on all pages of the listing will be exported. The number of exported records in both cases can be limited by means of the Number of records value below.

Number of records

Specifies the number of data records that will be exported. Empty value results in all records being exported. The specified number of exported records can be limited by enabling the Current page only option above.

Export column header

If enabled, column headers will be included in the exported file. This option is not available when exporting to XML as column header names are used as names of the respective XML elements.

Order by

Standard SQL ORDER BY expression. Exported items will be ordered according to this expression in the exported file.

 

Please note that you can select only columns that have a corresponding physical column in the database.

Use grid filter

If enabled, only data matching the filter above the listing will be exported. If disabled, all data will be exported regardless of the filter settings.

Where condition

Standard SQL WHERE condition. Only items matching this condition will be included in the export file.

Columns

In this section, you can use the check-boxes to choose which columns will be included in the export file. Bulk column selection can be performed using the following link buttons:

 

Select all - selects all columns listed in this section.

Deselect all - deselects all columns listed in this section.

Default selection - selects columns that were selected initially when the dialog was opened.

 

If the Export raw database data option is enabled, listed column names are identical to the actual database columns name. If the option is disabled, column names are shown as in the listing.

 

When you have the options adjusted, you can click Export to get the data exported to the chosen type of file. By clicking the Preview button, you get a maximum number of 100 records exported (unless you set a smaller number by means of the Current page only or Number of records options). This is useful in case that you are exporting large amounts of records and want to get a quick preview of the exported file without waiting for all records to be exported.

 

Advanced export - standard user

 

When the advancedexport Advanced export option is selected by a standard user who is not a global administrator, a dialog with simplified and more secure options  (compared to the global administrator version described above) is displayed to them.

 

devguide_clip1675

 

The following options can be adjusted in the simplified dialog:

 

Export to

Type of file to which the data will be exported. You can choose from the following:

 

Excel - exports data to an XLSX spreadsheet.

CSV - exports data to a CSV file.

XML - exports data to an XML file.

Delimiter

Displayed only when export to CSV is selected. Determines the value separation character used by the CSV file. The character can either be a comma (,) or a semicolon (;). See the CSV delimiters topic for more details.

Current page only

If enabled, only records displayed on the current page of the listing will be exported. If disabled, all records on all pages of the listing will be exported. The number of exported records in both cases can be limited by means of the Number of records value below.

Number of records

Specifies the number of data records that will be exported. Empty value results in all records being exported. The specified number of exported records can be limited by enabling the Current page only option above.

Export column header

If enabled, column headers will be included in the exported file. This option is not available when exporting to XML as column header names are used as names of the respective XML elements.

Order by

In this section, you can determine how exported records will be ordered in the exported file.

 

Initially, there are two drop-down lists displayed. In the first one, all columns that have a corresponding physical column in a database are offered. The second one determines if values will be exported in ascending or descending order according to values in the selected column.

 

Once you make your choice, another two drop-down lists are displayed below, allowing you to choose how records will be ordered in case of identical values in the column chosen above. After selecting, two other drop-downs are displayed below again. In the end, you can get as many pairs of drop-down lists as the number of offered columns.

Columns

In this section, you can use the check-boxes to choose which columns will be included in the export file. Bulk column selection can be performed using the following link buttons:

 

Select all - selects all columns listed in this section.

Deselect all - deselects all columns listed in this section.