TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
akshay rasalakar
NA
128
9.4k
Excel sheet
Aug 31 2015 10:46 AM
string fname = drop.SelectedValue + ".xls";
string namee = fname;
System.IO.FileInfo finfo = new System.IO.FileInfo(fname);
Response.Clear();
Response.AppendHeader("content-type", "application/x-msexcel");
Response.AppendHeader("content-disposition", "attachment; filename=" + drop.SelectedItem.Text + ".xls");
Response.End();
// I have created empty Excel Sheet but the problem is while opening its show me error like the file u r trying to open filename.xls is in a different format than specified by the file extension verify that the file is not corrupted and it from a trusted source before opening the file
Reply
Answers (
6
)
How to user signalR for multiple page in mvc
UI change using c#