Import CSV and Excel

StandardActionImportCSV

Standard Action Import CSV has the following properties:

Category Property  
General Properties Caption StandardActionImportCSVProperties
Tooltip
Enabled by default
Insert Records
Update Records
Delete Records
Stop on Error
Error if Key Column not found
Error if unmatching columns
Style Control Type
Image Type
Image 
Image Class
Disabled Image
Disabled Image Class
Action Group Control Type
Action Group Button Class
Action Group Disabled Button Class
Button Class
Disabled Button Class

 

In order to read about the properties Caption, Tooltip, Enabled by Default, Control type, Image, Image class, Disabled Image, Disabled Image Class, Action Group Button Class, and Button Class follow this link: Standard Actions

General Properties:

Insert Records: specifies whether to insert new records from the CSV/Excel file to the table when the IDs are new or the table has autonumber ID and the ID is empty.
Update Records: specifies whether to update records from the CSV/Excel file to the table when the IDs are of existent records
Delete Records: specifies whether to delete records of the table when their IDs does not appear in the CSV/Excel file
Stop on Error: specifies whether to display all the error messages thrown by an attempt of import or just display the first error.

Error if Key Column Not Found: specifies whether to throw an error when the columns related to the Primary Key are not present in the import file or not. In case you have this option as 'False', all the records of the import file would be new records to add to the table.

Error if unmatching Columns: specifies whether to throw an error when some column of the import file does not exist in the table or not.

 

These properties are set for all the ImportCSV/ImportExcel of the application, but if you want to change just one of the import process, you can do it directly in the generated procedure, in the subroutine 'Initialize parameters'. For example, in the import CSV of a person, you can visualize the subroutine mentioned:

ImportCSVProcedure

Just add code at the bottom of the subroutine, and change the value of any parameter.

If you want to use the new Standard Actions in a KB that already has WorkWithPlus and do not intend to run the Design System Wizard, you need to follow the steps below:

  1. Import the XML 'Resources.v14' located in <GeneXus_Installation>\Packages\Patterns\WorkWithPlus\Resources
  2. Go to WorkWithPlus Settings/Actions and configure the actions ImportExcel and ImportCSV (caption, tooltip, classes, etc). You can copy the image, and class properties from the ExportCSV action.

Import to Excel Standard Action is analogous to this one.