CopyRange Error

Posted by: hl26035 on 8 September 2017, 2:02 pm EST

  • Posted 8 September 2017, 2:02 pm EST

    How to copy area
    Such as First merge unit
    ActiveSheet.AddSpanCell(1,2,1,2)
    ActiveSheet.AddSpanCell(1,4,1,2)
    then Copy area ActiveSheet.CopyRange(1,2,2,2,1,4,false)
    error "cannot copy range over part of a spanned cell"


    Sorry


    it should be 


    this.fpSpread1.ActiveSheet.AddSpanCell(3, 2, 1, 2);
    this.fpSpread1.ActiveSheet.AddSpanCell(3, 4, 1, 2);
    this.fpSpread1.ActiveSheet.AddSpanCell(4, 2, 1, 2);
    this.fpSpread1.ActiveSheet.AddSpanCell(4, 4, 1, 2);


    this.fpSpread1.ActiveSheet.CopyRange(3, 3, 4, 3, 1, 4, false);

  • Replied 8 September 2017, 2:02 pm EST

    Hello,

    What version of Spread are you using and how are you copying the cell range? I have tested your code snippet with Spread 4.0.2010.2005 and it is working fine and copying the range without any error message. Are there any additional steps required to be performed to replicate the said issue?

    Thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels