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
Greyson Kirk
NA
1
576
certain columns from dataGridView to certain columns excel
Aug 11 2016 3:10 PM
I have 3 columns (out of 10) in my dataGridView that I need to export to columns a,c, and i, in excel.
for (int i = 1; i < dataGridView1.Columns.Count + 1; i++)
{ objexcelapp.Cells[1, i] = dataGridView1.Columns.Count - 1; i++ ;
}
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{ for (int j = 0; j < dataGridView1.Columns.Count; j++)
{
if (dataGridView1.Rows[i].Cells[j].Value != null)
{
objexcelapp.Cells[i + 11, j + 1] = dataGridView1.Rows[i].Cells[j].Value.ToString();
}
}
}
right now i have everything exporting. Also, I am fairly new to c#.
is this even possible?
Reply
Answers (
1
)
get multiple texts between two tags
How to use Telerik Grid in MVC application