Read EXCEL file at time of uploading on web page matched with given criteria or not

I want to upload a Excel on web page

File will must be on excel Format
Condition 1
(Checked that either it is matched with given criteria which user will send from WEB PAGE )
Condition 2
(Old record is not present in sheet) will be checked on basis on CNIC
In both condition it will not upload file and send error

Source: AngularJS