views:

57

answers:

3

Hi All,

Is there any option to disable the Export to Microsoft Excel menu in the IE browser right click.

I tried the web.config method and also changing the system registry using regedit.exe

As i want this menu to be disabled to users who are accessing my application.

+4  A: 

The ability to Export to Microsoft Excel is a feature of Internet Explorer and is turned on by a registry setting. Therefore, from your web application you will not be able to prevent this behavior in any meaningful way.

ahsteele
Is there any option that can be done when we deploy the code in IIS??
Murali
@Murali Not from your web application. I guess if you had control of the users desktop (ie you're creating an intranet app) then you could remove the registry setting but that'd be for every web page viewed with IE not just your application. Besides just because you remove the ease of exporting from the context menu doesn't mean I can't copy and paste your content from my browser window. General rule of the web: if I have access to your site, I have access to your content and therefore can manipulate said content with what application I choose.
ahsteele
+2  A: 

"i dont want the user to access my data."

If you don't want the user to access your data, don't put it on a public website. Exporting it to Excel is just a tiny shortcut, copying and pasting can do the same thing. And please don't even start to think about disabling copy and paste.

The golden rule of data on the web: Once it's out there, it's out there.

deceze
A: 

You can probably generate your pages as images so that user can't export or copy. But then you will probably have to disable PrintScreen button so that users can't OCR your text.

Some time ago online book readers fought to prevent users from copying the book text. E.g. they used JavaScript-generated text, and I think stuff like absolutely-positioned letters instead of plain text. But they lost this fight. And you will.

queen3