I have a question regarding excel validation .

I want to put a validation which checks the excel file header and also check if file is blank or not .

also the file should have some data with header. 

Hello Aditi from what I understood, if you want to upload an Excel file you can use the FileUpload component from OutSystemsUiWeb.


With this on a Screen Action you can check if the Content of the file you are uploading is empty:

To make sure you are uploading an Excel file with the right headers you can add a dummy Excel file to download for the user with the right fields (Create the a Structure with the attributes you want. On the action add a local variable with the datatype List of the Structure you created. Use the RecordToListExcel element and Download it.)

Best regards,

Sumeiya


Hi Aditi,


On top of Sumeiya already said, you can perform some custom validations when importing information from an excel to your DB.

Basically you will check every row of data. Mainly, checking if the field is empty or not (In my example it will happen inside VerifyBudget Server Action)



Inside that action you can do something similar with the below image. Checking if the field is Empty, and if it is you can save that record in a kind of log errors structure and therefore not saving it in the DB.


Best regards,

João Delgado