Posted 13 November 2020, 4:51 am EST
I’m upgrading an old winform application and have run into a snag.
The code simply copies 5 rows from the top of the sheet and paste then at assigned row with all formatting. This has worked in all previous version. Below is the error. Any help would be greatly appreciated.
Form1.FpSpread1.Sheets(x).CopyRange(0, 0, z, 0, 5, 13, False)
System.InvalidOperationException
HResult=0x80131509
Message=We can’t do that to a merged cell.
Source=FarPoint.Win.Spread
StackTrace:
at t2.a(String A_0, Type A_1)
at FarPoint.Win.Spread.Model.WorksheetDataModel.CopyInternal(Int32 fromRow, Int32 fromColumn, Int32 toRow, Int32 toColumn, Int32 rowCount, Int32 columnCount, ManipulationOptions options, Boolean dataModelDataOnly, Boolean& processedWorksheet)
at FarPoint.Win.Spread.SheetView.a(Int32 A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4, Int32 A_5, f1 A_6, Boolean A_7, Boolean A_8, Dictionary
2& A_9, Dictionary
2& A_10, Dictionary`2& A_11)at FarPoint.Win.Spread.SheetView.CopyRange(Int32 fromRow, Int32 fromColumn, Int32 toRow, Int32 toColumn, Int32 rowCount, Int32 columnCount, Boolean dataOnly)
at VulcanEBOM.Module1.UpdateShipWeight() in Module1.vb:line 1337
at VulcanEBOM.Form1.FpSpread1_CellDoubleClick(Object sender, CellClickEventArgs e) in Form1.vb:line 9792
at FarPoint.Win.Spread.FpSpread.OnCellDoubleClick(CellClickEventArgs e)
at FarPoint.Win.Spread.FpSpread.a(SpreadView A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4, MouseButtons A_5, Boolean A_6, Boolean A_7, Boolean A_8, Int32 A_9, Int32 A_10)
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)