This was the issue when I wanted to upload an xls file to my web application. With basically trying out everything, this was what solved my issue.
- Download the 2007 database engine from the link
- Installed it on the application server.
- Open IIS using inetmgr from the run prompt.
- In application pool area, click set application pool defaults
- A new window will pop up, find “enable 32 bit applications” and change it from false to true
- Restart the application pool
- Now try again to upload the file, the error message will surely disappear and you will be able to upload the file.