copying from spread sheetView to another

Posted by: doron on 8 September 2017, 12:27 pm EST

  • Posted 8 September 2017, 12:27 pm EST

    Hi


    I have a spread binded to a data table


    I want to copy the data as appreas on the spread ( not as appreas in the data table )


    into a new spread or into a new sheet view (that i will insert into a new spead)


    Is there a fast way to do this ?


    is it possible that when coying all the data such as column width , foreColor will be copyed to ?


     


    thanks


    doron


     

  • Replied 8 September 2017, 12:27 pm EST

    The easiest way to do this is to click on the sheet corner of the first spread and do a CTRL-C and then a CTRL-V into the other spread.  It will copy all the data and formatting.  I did, however, find what appears to be a bug.  It will not copy the header text to the new spread.  I will report it and see what the develpment team has to say.
  • Replied 8 September 2017, 12:28 pm EST

     


     

  • Replied 8 September 2017, 12:28 pm EST

    hi bob


    did you mean code like this ?


     


    Dim mySheet As FarPoint.Win.Spread.SheetView


    Dim newSheet As FarPoint.Win.Spread.SheetView


    mySheet.ClipboardCopy()


    newSheet.ClipboardPaste()


     


    thanks


    doron

  • Replied 8 September 2017, 12:28 pm EST

    Doron,


    That code will work as long as you select the entire sheet on the source control. Bob suggested clicking on the upper left corner of the Spread, but this can be don programatically as well. The ClipBoard copy gets data and formatting from the Spread, but only for cells that are selected.

  • Replied 8 September 2017, 12:28 pm EST

    How can I   click on the upper left corner of the Spread programatically ?


    or how can i select all the cells in the sheet


    so i can copy the data to a new spread ?


     


    thanks


    david

  • Replied 8 September 2017, 12:28 pm EST

    David,


    Just use code like the following.


    FpSpread1.Sheets(0).Models.Selection.SetSelection(-1, -1, -1, -1)

Need extra support?

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

Learn More

Forum Channels