Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i generate excel form database and save it on any folder.

please help me for save excel sheet on any folder.

What I have tried:

string pathsave = Server.MapPath("Upload/ExcelDataVendor/")                 xlWorkSheetToExport.SaveAs(pathsave + dt.Rows[0]["Name"].ToString() + ".xlsx");
Posted
Updated 23-May-17 2:39am
Comments
[no name] 23-May-17 8:09am    
Since you didn't tell us anything about a problem, what help is it that you expect from us?

1 solution

Server.MapPath only works if the folder is in your web space, for other folders you'll just need to know what they are and hard-code their path. If you are actually looking to save the file on the client file system, or to make the client download to a specific folder then you can't do that at all.
 
Share this answer
 

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