Version: 1.0 / 2022-03-31
The CSV Import Add-on can be installeded from the Add-on store. Press the “Ready Made Solutions” button at the bottom of the VisionX main view.
Go to the “Add-ons” category and install the CSV Import Add-on.
Restart VisionX to finish the installation of the Add-on.
We then have to enable the CSV Import Add-on in the application. Open the application and go to “Modules” menu item on the VisionX toolbar menu.
Enable the Add-on in the application by selecting the checkbox on the “CSV Import” row.
CSV Import is now an installed Add-on in this project.
To import data into an existing table, start the application, open a screen, and press the “CSV Import” button.
This opens the data import wizard where we import data from an existing CSV file or excel spreadsheet. Click on the “Upload file” button to choose a file to upload. It is possible to edit the data after the upload. Alternatively, data from a table can be copied and pasted into the text field in the wizard.
The following options can be selected for the import:
Review the preview table and verify that the data will be imported as intended.
Click the “Import” button to start the data import.
The CSV Import Example Application is also available in the ready made solution store
The CSV file can be downloaded here Import_New_Data.csv
The result of the import is shown on the next screen.
If any part of the import fails, all data rows that were not imported are displayed in the table under “Failed data rows”. Selecting a failed data row will show the reason(s) for failure in the second table.
We can then edit the failed data rows in the table and press “Retry failed”. The import will then start again for all failed data rows.
If the import was completed successfully the following screen will be shown. Click “Ok” to exit the wizard.
It is also possible to edit existing data in the table. The data will be updated using the record id (primary key).
We first export the existing data to a CSV File. Press the “Export” button or just use the following example: Update_Data.csv
In the Update_Data.csv file, the data in some of the rows has been changed. Therefore, only these rows will be updated during the CSV import.
It is also possible to insert new rows in the CSV file leaving the id column blank. In this case, the next available id will be used.
Be careful changing the id, since existing data can easily be overwritten.
After making all changes, simply import the updated CSV file using the “Import” button.
Now let’s take a look at the updated data. The address for the company “Izio” changed from “Buhler Terrace 8” to “Pond Hill 468” and there are also 2 new companies.
Installing the CSV Import Add-on also extends the CSV export functionality. The standard CSV Export exports the data of a table to a CSV file. With extended CSV Export, the following options can be chosen:
To reset the options to the default extended export, use the “Standard” button at the bottom of the screen.
There are several actions available related to CSV imports and exports. Additional Information on how to use actions can be found in the VisionsX actions documentation.
Disables the extended export per default.
Enables the extended export per default.
Hides the CSV import button per default.
Shows the CSV import button per default.
Disables the extended export of a specified table view.
Enables the extended export of a specified table view.
Hides the import button of a specified table view.
Shows the import button of a specified table view.
You can download the entire CSV example application from the VisionX Solutions Store.