Loading/Reading Excel File Automatically Instead of Bootstrap

Hello Guys

I am trying to create an application that can upload excel files and reads/load their content into the entity.

Anyone know how about to do this?


Hi David,

Since it was taking a while to write the how-to steps, just recorded a little video for it.
Here: http://screencast.com/t/1qH9aadjgNZ

Starts from an empty eSpace and I use a little trick to create the entity automatically.
First I drop the Excel and let the Intelliwarp do all the work for me. Then copy, undo and paste :)
You can create the entity manually also if you want.

My example excel looks like this:

SomeAttribute    OtherAttribute
a                        1
b                        2
Such a great reply, Thanks Joao

It seems like you already define the entity columns before you upload the excel.

I want it so that, the columns are dynamically generated based on the excel.

So some excel file I upload may have 3 columns, some file may about 20 columns etc...
That looks a bit more complicated requirement..

What does the entity that you want to fill looks like? Because entities, at least, need to be defined in design time.

Can you give some examples so I understand better what you want to achieve?
I may take back about dynamically generate columns

Well our clients will upload multiple excel files

for example:



with in each excel file, depending what columns our clients gives me. for order, I am mostly interested in
Item Number Order Number Shipped Qty and Ship Date. The client could give us 30 columns in Excel but I am only interested in those 5 columns

and with Item Master I am interested in Length Width Height etc... 

however each client will have different naming convention for their column variables, like ABC_Hgt, ABC_Width etc.. where some would be Height Width

I guess another question pop up that can how can service studio can ensure the right column in excel goes into the entity's column

Basic rules for import are explained in the help.
Having less columns is not an issue, just means that some attributes won't be filled.
Having more columns is not explained in the help (I'm not sure, but I think they are just ignored) so you will need to test it.

That said, this behavior still requires the naming of the headers to match the entity attributes.
To do more complex stuff like that (where number of columns and names don't match), there are some some components that interact with Excel directly like Advanced Excel that I think you can leverage to do it.
It just won't be as easy or have the same performance as the basic scenarios that the platform covers.

João Rosado