The first problem is you need to make sure that after the file uploaded that it cannot be accessed by the public. Make sure the files are stored outside of the web root. You also have to make sure they don't upload a file with a .asp
or .php
extension, or a file name that contains ../../../../../
. The 'content-type' is a user controlled variable and checking this value is a complete and total waste.
Next up, is that when you open an excel file this way it has to be parsed. This leads to Buffer Overflows like this one.
Make sure you system is fully up-to-date, but even then Microsoft has a terrible security track record and its likely that you'll be vulnerable for many days out of each year.