ClipboardOptions

Posted by: caoweidehao on 8 September 2017, 12:58 pm EST

  • Posted 8 September 2017, 12:58 pm EST

    [Me.FpSpread1.ClipboardOptions = FarPoint.Win.Spread.ClipboardOptions.AllHeaders]


    if Spread's Rowheader text has been setted,when I  cut the whole row ,the Spread's Rowheader text has been cut.


    [Me.FpSpread1.ClipboardOptions = FarPoint.Win.Spread.ClipboardOptions.NoHeaders]


    but when i copy the rowdata to Excel ,the Spread's Rowheader text  is not existed.


    what can i do for that?

  • Replied 8 September 2017, 12:58 pm EST

    Hello,


    When you set the ClipboardOptions to NoHeaders, the headers are not copied.

  • Replied 8 September 2017, 12:58 pm EST

    you are right.


    but when I  copy to Excel file,I hope that the headers also are copied.

  • Replied 8 September 2017, 12:58 pm EST

    Hello,


    You would need to change the ClipboardOptions in order to copy the headers.

  • Replied 8 September 2017, 12:58 pm EST

    thanks to scotts,


    if I  cut data,I hope that the header text is not cutted,but when copy to the Excel File the header text is also Pasted.


     

  • Replied 8 September 2017, 12:58 pm EST

    Hello,


    You can set up your own ActionMap to handle the Cut the way you want it done, so it does not cut the Headers.

     
    	<SPAN class=kwd>Private Sub</SPAN> Form1_Load(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As</SPAN> System.<SPAN class=kwd>Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> System.EventArgs) <SPAN class=kwd>Handles MyBase</SPAN>.Load
    <SPAN class=kwd>Dim</SPAN> im <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.InputMap
    <SPAN class=kwd>Dim</SPAN> am <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.ActionMap = FpSpread1.GetActionMap()
    im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
    im.Put(<SPAN class=kwd>New</SPAN> FarPoint.Win.Spread.Keystroke(Keys.X, Keys.Control), <SPAN class=st>"SpecialCut"</SPAN>)
    am.Put(<SPAN class=st>"SpecialCut"</SPAN>, <SPAN class=kwd>New</SPAN> SpcCut)
    FpSpread1.ClipboardOptions = FarPoint.Win.Spread.ClipboardOptions.AllHeaders

    <SPAN class=kwd>End Sub
    End Class

    Public Class</SPAN> SpcCut
    <SPAN class=kwd>Inherits</SPAN> FarPoint.Win.Spread.Action
    <SPAN class=kwd>Public Overrides Sub</SPAN> PerformAction(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>)
    <SPAN class=kwd>Dim</SPAN> ss <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.SheetView = <SPAN class=kwd>CType</SPAN>(sender, FarPoint.Win.Spread.SpreadView).GetSheetView
    ss.ClipboardCopy()
    ss.ClearRange(ss.GetSelection(0).Row, 0, ss.GetSelection(0).RowCount, ss.ColumnCount, <SPAN class=kwd>True</SPAN>)
    <SPAN class=kwd>End Sub
    End Class</SPAN>
     
  • Replied 8 September 2017, 12:58 pm EST

    thank you very muck!


    it greatly work for me.

Need extra support?

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

Learn More

Forum Channels