It seems, this is a web application.
It runs in your local machine as Excel Interop is available with does not exists in web where you are hosting.
This might be possible, if you are using dedicated server but not possible in shared server if not allwed by 3rd party hosting service provider.
Now my suggestion is, when you are building a desktop application using excel interop is fine and works cool. But when you are porting your application in a web, don't use interop/com
Instead use - Gridview Data to Excel. Its super fast and works great.
Here is a url where you can get sample code to do it,
Export Gridview Data to Excel in ASP.NET[
^]
Hope this helps.
Cheers