点击文件名下载附件
双击G3或者G5
var numberCellType = new NumberCellType {DecimalPlaces = cellNode.DecimalPlaces, ReadOnly = false};
var cell = toSheet.Cells[2, 6];
cell.CellType = numberCellType;
cell.Formula = $E$3*100/$C$3;
错误如下所示:
ystem.Exception: Exception handled in FpSpread.WndProc ---> System.NullReferenceException: Object reference not set to an instance of an object.
at FarPoint.Win.Spread.CellType.GeneralEditor.set_ReadOnly(Boolean value)
at FarPoint.Win.Spread.CellType.EditBaseCellType.set_ReadOnly(Boolean value)
at FarPoint.Win.Spread.SpreadView.StartCellEditing(EventArgs e, Boolean formula)
at FarPoint.Win.Spread.SpreadView.a(Int32 A_0, Int32 A_1, MouseEventArgs A_2)
at FarPoint.Win.Spread.SpreadView.g(MouseEventArgs A_0)
at FarPoint.Win.Spread.FpSpread.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
--- End of inner exception stack trace ---
at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)