I need to get info. from database and create a dynamic Excel file, which in turn should be sent as downloadable file.

When I tried to create the Excel File, I gave an error "Access Denied".

How could I solve the above problem.

It gives the error at:

Dim XL as new Excel.Application