After all comments to the question here the code which works.
for (int i= 0; i < dataGridView1.Columns.Count; i++)
{
xlWorkSheet.Cells[1, i + 1] = dataGridView1.Columns[i].HeaderText;
}
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
for (int j = 0; j < dataGridView1.Columns.Count; j++)
{
DataGridViewCell cell = dataGridView1[j, i];
xlWorkSheet.Cells[i + 1 + 1, j + 1] = cell.Value;
}
}
I hope it helps.