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
Shankar M
NA
55
2.8k
Export data issue
Mar 1 2018 6:07 AM
SqlConnection con = new SqlConnection("database connection string");
SqlCommand cmd = new SqlCommand("Select name,address from employee", con);
try
{
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.Fill(dt);
DataSet ds = new DataSet("New_DataSet");
ds.Locale = System.Threading.Thread.CurrentThread.CurrentCulture;
da.Fill(dt);
ds.Tables.Add(dt);
ExcelLibrary.DataSetHelper.CreateWorkbook("D:\\Employee.xls", ds);
MessageBox.Show("Exported");
}
catch (Exception ec)
{
MessageBox.Show(ec.Message);
}
using above query when I am exporting data to excel sheet it copies the same date three times in output
Reply
Answers (
23
)
Delegates and events
i can'n perform record update using RowUpdating in gridview?