Monday, January 13, 2014

Using Excel Surveys in SharePoint 2013 on-premises

[Update 3 - September 22nd 2015]
Thanks to Brandon Showers who let me know this was no longer working, so I tested it now with the August 2015 CU, and Microsoft has added some checks. Basically you need to ensure two farm elvel properties are set to true before you can set the ShareByEmailEnabled property on the site collection to true. So here goes:

$farm = get-spfarm
$farm.Properties["GuestSharingEnabled"] = $true
$farm.Properties["SPO-GuestSharingUIEnabled"] = $true
$farm.Update()

As you can see, we now need to set an SPO specific property as well to get this working. Once you have the farm level properties in place you can enable ShareByEmailEnabled on any site collection.

[Update 2]

Seems there is an even easier way of doing this. First create a new Excel document in your SkyDrive library, then look at the ribbon in Excel Web Apps and click the “Survey” button.

image

The next question is why this option is available on SkyDrive Pro and not for example a Team Site? Enlisting the help from Wictor Wilén solved it fairly quick. If you set the property ShareByLinkEnabled on SPSite to true, the survey option becomes available. This option controls if a user will be able to share links to documents that can be accessed without logging in.

[Update 1]

Using Fiddler I found out that the link to create a new survey look something like this:

http://intranet/my/personal/mikael_svenson/_layouts/15/CreateNewDocument.aspx?SaveLocation=%2Fmy%2Fpersonal%2Fmikael%5Fsvenson%2FDocuments&DefaultItemOpen=1&Source=http%3A%2F%2Fintranet%2Fmy%2Fpersonal%2Fmikael%5Fsvenson%2Fdefault%2Easpx%3FInitialTabId%3DRibbon%252EDocument%26VisibilityContext%3DWSSTabPersistence&TemplateType=5&IsDlg=1
where TemplateType is the clue to create a survey. TemplateType=2 is a regular Excel sheet and 5 is survey. With this information it should be fairly easy to create a custom action which will let you create a survey from a button or link.

[Original Post]

SharePoint On-line has a cool function which allow you to create a new survey using Excel and Office Web Apps. If you head over to your SkyDrive (Pro) and click new document you are presented with the following dialog which allows you to create an Excel survey.

image

My next thought was that this would be a cool feature on-premises as well, but further examination show the link is not showing on SkyDrive for an on-premises installation of SharePoint 2013.
But, that does not mean that it’s not there :-)

First head over to SkyDrive on your on-premises farm. Next create a new document and pick Excel workbook. The URL will look something like this:

http://intranet/my/personal/mikael_svenson/_layouts/15/WopiFrame.aspx?sourcedoc=%2Fmy%2Fpersonal%2Fmikael%5Fsvenson%2FDocuments%2Ftest%2Exlsx&action=editnew&IsDlg=1

The clue now is to change the editnew action with formedit, 
http://intranet/my/personal/mikael_svenson/_layouts/15/WopiFrame.aspx?sourcedoc=%2Fmy%2Fpersonal%2Fmikael%5Fsvenson%2FDocuments%2Ftest%2Exlsx&action=formedit&IsDlg=1

This will bring up the Edit Survey dialog and you can create and share your survey.

image

I tried the same approach in a document library on a team site, but that did not work, so not sure which feature on SkyDrive (Pro) which enable the survey functionality.

You can read more about creating a survey at http://office.microsoft.com/en-001/sharepoint-help/create-a-survey-HA102775328.aspx

13 comments:

  1. I am running SP 2013 Enterprise SP1 On-prem and don't see the survey option after I created an excel web apps doc. Is there another feature that needs to be activated? Thanks in advance.

    ReplyDelete
    Replies
    1. Did you create it in your OneDrive Pro library? And are you using Excel 2013?

      Delete
    2. The Excel doc was created directly through OneDrive. Thanks!

      Delete
    3. Hi, so are you now seeing the button in Excel, or still an issue..and what is the issue exactly? :)

      Delete
  2. Hey Mikael. Yes, i'm still having the issue. I have SP 2013 Enterprise SP1 (on-prem) and I don't see the the survey button on an Excel file created in Office Online. Do you have any suggestions? Thanks.

    ReplyDelete
  3. Just what I was looking for.. thanks :-)

    ReplyDelete
  4. Yes, i'm using Excel 2013. However, the instructions say "First create a new Excel document in your SkyDrive library, then look at the ribbon in Excel Web Apps and click the “Survey” button." I checked both the OneDrive and local client Excel file and don't see the survey option after the file was initially created in OneDrive.

    ReplyDelete
  5. This doesn't appear to be a valid workaround for on-prem any longer. I've followed your steps and I also do not have the survey button in excel 2013 owa. SharePoint 2013 SP2 June CU.

    Any ideas?

    ReplyDelete
    Replies
    1. I'll give it ago tomorrow in my on-premises dev environment. Thanks for letting me know.

      Delete
    2. I added an update to the top of the post on how to get this working with later CU's.

      Delete
  6. what are the implications of updating the farm with both the values to true.

    ReplyDelete
    Replies
    1. Users might be able to type any address when sharing, but the sharing will fail when you click send/share if I remember correctly.

      Delete