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
yokzu
NA
306
0
Copying Datatable to Excel or Access file?
Oct 25 2011 4:23 AM
Hi,
I just wanna know that is there any easy way to copy a Datatable's data(or Dataset) to an Excel file? My codes are below;
------------
SqlConnection bag_sql = new SqlConnection("Data Source=Mega;Initial Catalog=Config;User Id=WindsCm;Password=1abc;");
bag_sql.Open();
OleDbConnection bag_excel = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=hw.xlsx;Extended Properties=Excel 12.0 Xml;");
bag_excel.Open();
String query_router="SELECT * FROM Node WHERE Node_City='NY'";
SqlDataAdapter oadp = new SqlDataAdapter(query_router, bag_sql);
DataTable tbl_router = new DataTable();
oadp.Fill(tbl_router);
...
---------------
Reply
Answers (
2
)
How to store decimal value in c#
C# xna