ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Automatic Application Features (AAF) / AAF on Tables/TreeView Tables
  • Overview
  • Performing an export
  • Programming
  • Name of export file
  • Disabling the export option
  • Running an export
  • Modifying the option caption
  • Securing the exports
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
You want to perform simulations with Excel, Word, LibreOffice, ...? Nothing's easier. Simply "export" the control content to the desired software. The corresponding file is automatically created from the content of exported control and it can be immediately used by another software.
The controls proposing this option are as follows:
  • Table and TreeView Table.
  • TreeView.
  • Looper.
  • Pivot table (to Excel only).
Performing an export
To perform an export to Excel, Word, ...:
  1. Open the context menu of table and select "Export table to...".

    Remark: If the option is followed by a padlock or a star, a password is requested before performing the export.
  2. Specify the name of Excel file to create as well as its location.
  3. The application proposes to directly open the created file.
Remarks :
  • If the file already exists, you can overwrite the existing file or merge it with the file being created. The merge operation allows you to keep all the modifications performed (for example, for an Excel file, format of cells, formulas, ...).
  • The "High-precision numeric" columns (with 38 significant digits) are exported to Excel as exponential numbers.
Programming

Name of export file

By default, the suggested file name corresponds to the caption of the Table control. This name can be modified programmatically with the Caption property.
For example:
// In order for the file proposed to export to be "ExportStat2016"
TABLE_MyTable.Caption = "ExportStat2016"

Disabling the export option

To disable the export option in a Table, TreeView Table, TreeView or Looper control, simply use AAFDisable:
  • with the aafTableToExcel constant to disable the export menu to Excel.
  • with the aafTableToWord constant to disable the export menu to Word.
  • with the aafTableToXML constant to disable the export menu to XML.
The corresponding menus options will not be displayed anymore.

Running an export

To export data from a Table, TreeView Table, TreeView or Looper control through programming, simply use AAFExecute:
  • with the aafTableToExcel constant to export the control content to Excel.
  • with the aafTableToWord constant to export the control content to Word.
  • with the aafTableToXML constant to export the control content to XML.

Modifying the option caption

The caption of the menu option allowing the user to export the control content is "Export to Excel", "Export to Word", "Export to XML", ... To modify this caption, use AAFChangeCaption:
  • with the aafTableToExcel constant to modify the export option to Excel.
  • with the aafTableToWord constant to disable the export option to Word.
  • with the aafTableToXML constant to disable the export option to XML.

Securing the exports

The data displayed in the Table, TreeView Table, TreeView or Looper controls can be exported. If confidential data is displayed in these controls, you can:
  • forbid the export. In this case, the corresponding option is not proposed.
  • ask for a password. In this case:
    • a padlock (or a star '*') is displayed in the corresponding menu option.
    • a window asking for a password is displayed before performing the action. If the password is invalid, the action is not performed.
To secure the exports performed via the context menu found in the Table, TreeView Table, TreeView or Looper controls, use AAFExportSecurity.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 10/21/2022

Send a report | Local help