Nirav, if I understand correctly, you want to send the .XLSX file from the server to the browser, but to give the user the option to SAVE the file rather than have it automatically open in Excel?
If that's the case, then in your server-side VB.Net code, do something like:
Dim filename as string = "demo.xlsx"
Dim fullfilename as string = server.mappath([filename])
Response.Clear()
Response.Headers.Add("Filename", filename)
HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}.xlsx", filename))
Response.ContentType = "vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Response.WriteFile(fullfilename)
Response.End()
The important part here is the
content-disposition
, which tells the browser to "download" rather than open it. How the browser deals with this is browser-specific; Chrome will always put it in the Downloads folder, IE may prompt you for a location. Hopefully the above will help you, even if only with some keywords to research further.
Good luck!