Your are missing a type cast. Do it like this-
Label name = (Label)GridView2.Rows[i].Cells[j].FindControl("lblname");
xlWorkSheet.Cells[i + 1, j + 1] = name.Text;
Update- If you can name your labels as Label0 and Label1, then in the second for loop-
for (int j = 0; j < GridView2.Rows[i].Cells.Count; j++)
{
Label xyz = (Label)GridView2.Rows[i].Cells[j].FindControl("Label"+j);
xlWorkSheet.Cells[i + 1, j + 1] = xyz.Text;
}
For Header text- string hText = GridView2.HeaderRow.Cells[your column number].Text;