Uploading an excel file and populating a form with it's data.

Is there a way to have a button that uploads an excel file and automatically populates a given form with the excel data (No need to worry about the structure of the data. Assume that the excel is a pre made template and a user only fills in pre chosen cells in that and the form is compatible with the excel). I don’t want to have a submit button but once the user choses the file, the result should be automatic populating values in the fields.
(Also no need to worry about what excel library to use.)

You could write some JavaScript that would detect when the upload file field has been changed, and perform a submit at that time.

The view invoked by that submit could process the selected file and return data that your JavaScript could then use to update the form fields.

I think my question is kinda wrong because it would probably be a good practice to let the user double check the file they are uploading and then submit rather than uploading and auto submitting the wrong file. Anyways thanks for the pointers as usual.