Click here to Skip to main content
16,020,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a survey and gave users contribute permissions.
then in the advanced settings set to only allow a user to see their own
responses and from the survey site this all works fine.
If they look at the graphical view or just plain view of the responses they just see
theirs.
But they also have the option to export to spreadsheet (Excel) and when they
do they get all responses.
Can the Action (Export to Spreadsheet) be disabled for a contributor?
Posted
Updated 6-Nov-12 18:26pm
v2

1 solution

I had to use JavaScript find each element and the hide the export button.
see here http://techtrainingnotes.blogspot.in/2008/02/sharepoint-hiding-menus-not-using.html[^]

I just added

JavaScript
var doc = document.getElementsByTagName('ie:menuitem');
for (var i = 0; i < doc.length; i++)
 {
   itm = doc[i];
   if (itm.id.match('ExportToSpreadsheet')!=null)

     { itm.hidden=true; }
  }


oh ... and you need to add this below the
HTML
</WebPartPages:WebPartZone>

in the view
Modify the view in SharePoint Designer in advanced mode

Update:
This works for anything in SharePoint not only (surveys or lists)
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900