Welcome to Office Zealot Sign in | Join | Help

Hiding 'Export results' Button on SharePoint Surveys

One of the nice features of SharePoint surveys is the ability to 'Export results to a spreadsheet'.  This button is just to the right of 'Respond to survey'.  It takes all of your survey results, per user, and dumps it to a spreadsheet.  In cases where you chose to not show participant names, the names are starred out in the download.  But what if you don't want users to have access to this data?  How can you disable or hide the 'Export' functionality and not affect survey participation?

Add the following javascript snippet to the survey page (using FrontPage).  This causes the 'Export results to spreadsheet' button to not appear...

<script language=javascript>
theExport = diidIOExportToSpreadsheet[0];
while (theExport.tagName != 'TABLE')
     theExport= theExport.parentNode;
theExport=theExport.parentNode;
theExport.style.display='none';
theExport.nextSibling.style.display='none';
</script>

Published Thursday, January 26, 2006 4:57 AM by Mauro

Comments

Thursday, January 26, 2006 2:59 PM by Anonymous

# re: Hiding 'Export results' Button on SharePoint Surveys

Nice Tip.
Thursday, February 23, 2006 5:49 PM by Anonymous

# re: Hiding 'Export results' Button on SharePoint Surveys

I've seen this tip posted on MSD2D and here. It's a great idea, but I can't get it to work. I tried posting the script just above the title tag on the survey page. It didn't work. I also tried posting it on the overview page. That didn't work either. Is it possible I need to adjust the survey properties to get it to work? Any help you can provide would be greatly appreciated.
Saturday, February 25, 2006 5:42 AM by Mauro

# re: Hiding 'Export results' Button on SharePoint Surveys

Try placing the script code at the bottom of the page...
Thursday, October 26, 2006 11:50 AM by Anonymous

# Customizing survey's by injecting javacript.

Just thought I would add this to your survey customization tip.

Populating form fields dynamically from querystring parameter in lists or surveys
---------------------------------
http://blog.nehanishant.com

# Malcolm Gin&#8217;s SharePoint and .NET Tips &raquo; Blog Archive &raquo; SharePoint 2003 Reader Permissions include&#8230; Export to Spreadsheet!

Anonymous comments are disabled