帮助我解决此错误
for(int i=0;i<metroGrid1.RowCount;i++)
{
for(int j=0;j<metroGrid1.ColumnCount;j++)
{
oSheet.Cells[i + 3, j + 1] = metroGrid1.Rows[i].Cells[j].Value.ToString();
}
}