我把Cells[0, 0].CellType = nct;改成grdMain.ActiveSheet.Columns[4].CellType = nct;也就是第5列怎么就不对呢?
代码为:
- NumberCellType nct = new NumberCellType();
- grdMain.ActiveSheet.Columns[4].CellType = nct;
- grdMain.ActiveSheet.Columns[6].CellType = nct;
- grdMain.ActiveSheet.Cells[e.Row, 9].Value = double.TryParse(grdMain.ActiveSheet.Cells[e.Row, 4].Value.ToString(), nct)
- * double.TryParse(grdMain.ActiveSheet.Cells[e.Row, 6].Value.ToString(), nct);
-
复制代码
请问哪里错了? |