ExcelImporter module, import several files and get each file using a tag, key...

Is there any way to import several files with the ExcelImporter module and differante between them (between each imported set of rows)?
1 answers

Hello Maryam, 

I think we can only really help you if you explain your use case in more detail and goal you want to achieve.

Otherwise it's a bit hard to point you to the right resources. Like where are the files located? Are they in some file system like Sharepoint? Are they manually uploaded by a user in one step? Are the files identical in the column structure or use different import templates? Based on what criteria do you want to differentiate between them (e.g. the imported objects could be associated to the original import file, have some kind of automated id (like an UploadID), use a tag that is found in the imported excel itself etc.). What is the reason there are multiple files? Were they splitted into multiple files from one very large one?

Assuming you want a user to manually upload multiple files in one step, they all use the identical import template, you could use the File Dropper widget with the following data model:

- You first create a context object that points to the import template to use when the user starts (e.g. in a create microflow)

- You show a page with the ContextObject as dataview and place the File dropper widget on it

- In your save microflow of the context object, you retrieve all uploaded files and loop over them

- In the loop, you call a microflow similar to the example microflow IVK_ImportTemplateDocument 


Because the ImportedEntity has an association to the UploadFile, you can still differentiate between them and know of which import the imported data came from. Note however, that if multiple files contain data for the same entities, the later imports overwrite the prior import.