Creating table from excel by end-user

Creating table from excel by end-user


Ik know that one can create a table (entity) in the platform from an excel file. But is there a way to let end-users do that too. I want users to import excel sheets that have different layouts (columns) that are not known upfront. 

Regards. Harry

You must not let the users define the structure of your application!

The best way would be.
-You accept any excel format
-Save its column names to a table with many text attributes (or find if that set already exists)
-Save values to a second table also with many text attributes.

Id TableName Column1 Column2 Column3 Column4 Column5 Column6 Column7  
Id Filename TableId Value1 Value2 Value3 Value4 Value5 Value6 Value7

Will this be enough?
Hi Nuno,

I don't think that importing an excel and creating a table will define the structure of an application, but I guess the answer is that the Outsystems platform has no functionality to do this automaticly. The approach you'r giving is the one I use now (other platform). What's the (most easy) way save the column names and values to tables in Outsystems?

Regards, Harry
HI Harry,

What would you do with such data? If the application doesn't know the structure how can it manipulate it?
Can you explain better what your ultimate goal is?
Hi André,

Users should be able to upload excel files and use that data to send messages. In a messagetool we're building users can create campaigns and send messages (e-mail, sms, Text2Speech) where the data from the excel can be used in the message itself. If one could use an excel that creates a table (in the campaign you can point to the data(table / excel to be used) than you can use the columns in the message. We don't know upfront the structure of the excel (and they can be different of course) We now use a kind of approach that Nuno suggested, just asked if there might be a different (easier) way in the Platform.

Regards Harry

Regards, Harry
You can't create tables in runtime unless you do it with an extension.

The approach I said above, I've used successfully to replace a xml structure interpreted by java in runtime. If you also used it, you know its advantages and disadvantages.

The other approach would be to think in all possible column names and create a Structure with all of them to receive the maximum predictable types of the data in the file.

Then you create an Entity with the frequently used names and maybe one or two more and map the Structure to Entity.

For instance, Structure can expect columns Client, Name, Client Name, Phone, Telephone, PhoneNumber, email, mail address, e-mail, electronic address, mailto... and Entity will simply be ClientName, PhoneNumber, EmailAddress.

This is neat, but any unexpected field will be lost.
Hi Nuno,

I will use the above mentioned approach (two tables to hold colmns and fields) because we cannot upfront be sure which columns are used. Thanks for thinking along (also for André).

Regards, Harry