Skip to content

How to disable cut,copy and paste option in excel using c#?

Harish Babu Kankanala

Asked Feb 10, 2015, 12:50 PM EST1 answer
Share
LinkedInX

I have tried the code shown below to disable cut,copy and paste option in excel using c#, but still I'm able to copy and paste.

Code
Microsoft.Office.Interop.Excel.Worksheet wks = (Microsoft.Office.Interop.Excel.Worksheet)wkb.Sheets[1];
Code
wks.Application.CutCopyMode = (Microsoft.Office.Interop.Excel.XlCutCopyMode)0;
 Any suggestions how to fix this problem?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 1 short reply
    • Vithal Wadje
      +1
      make excel file readonly
      +1