Of course it happens on server system, as everything in ASP.NET. How else? And you really should better do it on the server side. The client will be able to download the file created, or the resource directly from the HTTP response, if you provide the URL and the resource for that. (Again, how else?)
In file approach, you just create a file on the server and generate the line with URL pointing to the file on some HTML page:
<a href="myDocument.xlsx">Download the document</a>
If you want to avoid creation of a file, you should be able to write the document directly to the network stream of your HTTP request. First of all, you need to generate appropriate content-type header:
http://msdn.microsoft.com/en-us/library/system.web.httpresponse.headers%28v=vs.110%29.aspx[
^].
The headers should be ""application/vnd.ms-excel". You can find most types here:
http://en.wikipedia.org/wiki/Content-type[
^].
Those content types are standardized here:
http://www.iana.org/assignments/media-types[
^].
In all cases, the user will be given and option to open the file by a default application (it will work if such other application is installed, which is possible on many platforms, not only Windows, say, thanks to Libre Office) or save it (it will be the only version if none of the installed applications can work with excel files).
—SA