SheetView sv = fpSpread1.Sheets["sheet1"];
if (sv == null)
return;
int activeRows = sv.NonEmptyRowCount;
if (activeRows > 2)
{
sv.Cells[2, 9, activeRows - 1, 27].BackColor = Color.White;
for (int i = 2; i < activeRows; i++)
{
for (int j = 9; j < 26; j++)
{
if (sv.Cells[i, j].Formula == string.Empty)
{
sv.Cells[i, j].BackColor = Color.Red;
}
}
}
}
代码如上,程序执行至 sv.Cells[2, 9, activeRows - 1, 27].BackColor = Color.White;
时就变成“无响应”了,,0506帮我看下是什么问题 |
|