Using ExcelImporter requires Generalization to System.FileDocument?

0
Hi all,  I am currently working on uploading excel file with ExcelImporter Module. I have been uploading some files successfully,  but I’ve noticed I haven’t created an entity which has “Generalization to System.FileDocument” to connect my entities. Would there be any problem using ExcelImporter without using the entity with generalization?  and why?   Thank you in advance Regards, Yuki
asked
2 answers
2

The reason you have to create specializations of the FileDocument (and Image) entity is because of the configured security/access rules.

The FileDocument doesn’t have any access rule for any role. Because 

  1. if it would be set, then it could not be changed since its part of the hardcoded, not changeable system module
  2. Even if you could change only the admin (small amount of users) and User (all other users) could be distinguished and thus not suitable for correct security configuration.

With a specialization in the related module, you are able to configure the security access yourself AND more precise using the available module roles.

So you need a specialization to be able to upload a document and process through the ExcelImporter logic. Possibly you used the specialization in the ExcelImporter module to upload your XLS file and thus not bumping into the security situation described above.

Do you need your own specialization in your own modules instead of the ExcelImport specialization: Depend on your use case. If your proces is: upload excel import data get rid of the excel file, then its not needed.

If situation is upload file, import data and Excel file should be available for the “normal” user not being a backend admin. Then I would advise to use your own specialization.

answered
1

Hi Yuki Aibe,

I think this depends on whether you want to store the excel document you want to upload. If you'd like to store it in your application you can store it in any entity with the generalization filedocument.

If there is no requirement to store the file itself, and you just want to save the data inside the excel in some entity, you wouldn't need to create your own entity that is a specialization of filedocument. For uploading the excel you'd use the entity provided for this in the excel importer module.

I hope this helps!

answered