Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I want to save Excel file to specific path, but in client computer, not in server. It is possible?


VB
Response.Clear()
			Response.Buffer = True
			Response.AddHeader("content-disposition", "attachment;  filename=test.xls")
			Response.ContentEncoding = System.Text.Encoding.default
			Response.Charset = ""
			Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
			dim sWriter As New StringWriter()
			Dim hWriter As New HtmlTextWriter(sWriter)
			GridView1.AllowPaging = False
GridView1.RenderControl(hWriter)
			Response.Output.Write(sWriter.ToString())
			Response.Flush()
			Response.End()
Posted
Updated 9-Sep-14 22:43pm
v3
Comments
Prasad Avunoori 10-Sep-14 6:09am    
What is the problem with above code?

1 solution

TRY THIS FORUM , THIS MIGHT HELP YOU, export-excel-data-to-datagrid-using-openfiledialog/[^]

OR THIS. [^]

And i think you should specify a pathfile so that it saves on client pc.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900