when version up, ctrl + c keys do'nt copy spread data to excel sheet. why??

Posted by: reddman on 8 September 2017, 2:09 pm EST

  • Posted 8 September 2017, 2:09 pm EST


    SureshD,


    I want that I tried to copy spread data to  excel sheet.


    When I used Spread  ver. 2003.2005 v3, I could copy spread data to  excel sheet.


    When I patch ver.2003.2005 to 2010.2005, I can't copy spread data to  excel sheet.


    And I tried to do (input map, autoclipboard), this problem can't be solved.


    I post with sample source.


    source : visual studio .net 2005/ Spread ver 3.0 2010.2005


    Thanks


    2009/12/SpreadTest-2.zip
  • Replied 8 September 2017, 2:09 pm EST

    Hello,

    Could you please send us a zipped sample project to debug?

    Thanks

  • Replied 8 September 2017, 2:09 pm EST

    Hello,


    At first, I can copy spread data to excel sheet,


    At second, I can't copy spread data to excel sheet.


    I post with sample source.


    Thanks


    2009/12/SpreadTest_OK.zip
  • Replied 8 September 2017, 2:09 pm EST

    Hello,

    I have set AuotClipBoard off and used the InputMap to capture ShorCut keys(Ctrl+C,Ctrl+X etc) with Spread's ClipBoardCopy(), ClipBoardPaste(), ClipBoardCut() and it seems to be working fine.

    I made some changes to the sample project sent by you, please have a look.The content will not Cut/Paste as the Cell is locked, however you will be able to Copy the Cell Content.

     

     

     

    Thanks,

     


    2009/12/SpreadTest-3.zip
  • Replied 8 September 2017, 2:09 pm EST

    Dear. DeepakSharma


    At first, I  success to copy spread data to excel sheet, But At Second, I can't copy to spread data to excel sheet.


    I think that clipboard has some error. So, if I can clear clipboard, I can copy to spread data to excel sheet at second.


    Could you help me??


    Thanks.

  • Replied 8 September 2017, 2:09 pm EST

    Hello,

    You need to Clear the ClipBoard everytime before Copying the Locked Cells.

    I tested the same for a button click it seems to be working fine.

    Thanks,

  • Replied 8 September 2017, 2:09 pm EST

    Dear. DeepakSharma


    Thank you for your reply. How I clear the clipboard evertime?


    Would help me with source sample?


    Thanks.


     

  • Replied 8 September 2017, 2:09 pm EST

    Hello,

    You may capture Spread's Key_Down Event and Check for the Key pressed if they are "Ctrl" +"C" e.g.

     1.You may capture Event for KeyDown and Check for Ctrl and C
     
    e.g.
     
    private void fpSpread1_KeyDown(object sender, KeyEventArgs e)
     
    {
     
    if ((e.KeyCode == Keys.C) && e.Control) //Ctrl+C
     
    {
     
    e.Handled = true; // prevent clipboard copy
     
    Clipboard.Clear();
     
    fpSpread1.ActiveSheet.ClipboardCopy();
     

    return;
     
    }

    }

    Thanks,
Need extra support?

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

Learn More

Forum Channels