Please help me to find out the type of the file which is being uploaded. I wanted to distinguish between excel type and csv.
MIMEType returns same for both of thes
The CSV will start with text and the excel type is most likely binary.
However the simplest approach is to try to load the excel document using POI. If this fails try to load the file as a CSV, if that fails its possibly neither type.