Import/Bootstrap entity

  
Import/Bootstrap entity:

If excel column names contains space then on importing entities from Excel, space is removed from name of attributes.

As name of columns in excel & attributes in entities are different, On bootstrapping data from excel into entities mapping is not possible & data can't be seen on listing screen. What is a way out for this?
When I create an entity using, 'Import Entiry From Excel' it creates entity but changes the attribute name i.e from First Name to FirstName, releasedate from Release Date.
Hence, when I am trying to bootstrap an excel file which has column name as Release Date, First Name etc, and the Outsystem is unable to match those columns with the existing entity [with FirstName and ReleaseDate] and hence I am unable to import data from Excel, what is the solution for this?


The obvious simple fix is to alter the column headings in the Excel sheet to remove the spaces.  All other options will require significant extra effort but if you really, really want to do that let me know and I can provide some options.
Curt Raddatz wrote:
The obvious simple fix is to alter the column headings in the Excel sheet to remove the spaces.  All other options will require significant extra effort but if you really, really want to do that let me know and I can provide some options.
Thank you for prompt reply.

 Yes, please provide me information about how can I also check the datatype and length of the specific data in the column of Excel.
Also, the columnname change, if possible.


 
So, as I indicated, to do all this will require a lot of work.  Hopefully I can get you started with the attached OML file.  This code, extracted from one of my projects, imports CSV files into Outsystems entities.  Note that you need to install CSVUtil from the Forge first. The code provided shows an example of how you can import Nations, States and Provinces and Postal Codes and provide links between those tables as they are created.  Since the structure used by the conversion maps to an existing entity, the field names are unimportant.  In fact you'll need to add logic to skip the first record unless you delete it manually.  So, to make use of this code follow the pattern I used for my three entities.

1) Create the new entity with all fields
2) Export the Excel file as a CSV file
3) Add the CSV file as a resource
4) Create a structure that matches the data fields you want to keep - all data types should be text to prevent errors
5) Replicate the logic from one of my entities for your new entity
6) Replicate the LOAD logic and add any additional validation you need - if you have errors you might want to create an error entity so you can see those errors also showing the row, column, etc.
7) Add a button to the home screen to call the Load logic

Hope this helps you get started,
Curt