日期:2014-05-17 浏览次数:20917 次
for (int i = 0; i < gridView.RowCount; i++)
{
for (int j = 0; j < gridView.ColumnCount; j++)
{
excel.Cells[i + 2, j + 1] = gridView[j, i].Value.ToString();
Range ra2;
ra2 = sheet.get_Range(excel.Cells[1,1]);
ra2.Font.Bold = true;
ra2 = null;
}
}
ra2 = sheet.get_Range(excel.Cells[1,1]);
ra2.Font.Bold = true;
Range ra2;
ra2 = null;