Share via


Refreshing PowerPivot Gallery thumbnails

 

Let's assume that for some reason something got corrupted and you want to regenerate the thumbnails for a given workbook in a PowerPivot Gallery. You can either change the properties for the workbook, which will create an event that will trigger the regeneration of the thumbnails (more details at Dave's blog here: https://bit.ly/9Z23pt). Under the hooks, adding a new document to a SharePoint library (PowerPivot Gallery included) or modifying a document in a SharePoint document library causes SharePoint to throw either a itemAdded or itemUpdated event. The event is observed and handled by PowerPivot, which calls the GetSnapshot.exe as the farm account passing along a few parameters.

If you'd like to try it manually, open a command prompt (or PowerShell prompt) as the farm account (or login as the farm account);

Find the folder [SystemDrive]:\inetpub\wwwroot\wss\VirtualDirectories\80\bin;

Run GetSnapshot.exe with the following parameters:

GetSnapshot.exe <server> \"<DocumentPath>\" \"<OutputFolder>\" <tempFileSeed> [<maxSnapshotCount>] [<timeoutSeconds>]

Parameter

Description

tempFileSeed

is the basis of the file name of the generated thumbnails;

maxSnapshotsCount

is the maximum number of snapshots to be taken;

timeoutSeconds

is the maximum amount of time in seconds before the process is aborted.

Example:

C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin>GetSnapshot.exe "https://myserver" "https://myserver/PowerPivot Gallery/myWorkbook.xlsx" "C:\Users\marianotn\Desktop" marianotn_test 26 300

Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. The GetSnapshot.exe is part of PowerPivot for SharePoint. It’s not redistributable, and not it was not designed to be used any other way than by the PowerPivot for SharePoint system.

J

Comments

  • Anonymous
    October 15, 2010
    Excellent job Mariano. A little bit of a clarification. The instructions tell you to run GetSnapshot under the farm admin service account. You can certainly do that if you want, however if you want to run it in the same environment that the event runs in, you should use the web application's app pool service account. The two accounts might be the same if you installed the PowerPivot machine as a "New Server", but does not necessarily have to be. The web application's app pool service account is key.

  • Anonymous
    October 15, 2010
    That's very true! Thanks for pointing that out, Dave! :)

  • Anonymous
    November 13, 2011
    is it possible to change the default timeout value? my senarios is the excel workbook takes more than 5mins to load, so i guess the getsnapshot.exe needs 5+ mins to wait.

  • Anonymous
    April 11, 2013
    I get an error that getsnapshot.exe is not a valid win32 application - any ideas?

  • Anonymous
    August 30, 2013
    Have you come across an issue where when trying to view the powerpivot gallery view you only see a blank screen, but if you add the user to the local admins group on the server then the user is able to view the powerpivot gallery? I am concerned becuase I dont want to add normal users to local admins on the server. is there a way around this?

  • Anonymous
    May 02, 2014
    IS there a way to automate this for multiple files as a backend process?

  • Anonymous
    July 14, 2014
    Hi Mariano, While GallerySnapShot.exe, will there be any impact on server performance.

  • Anonymous
    August 13, 2014
    Hi, I got this working with excel workbooks but not with PowerView reports. Is there similar way to refresh Power View reports in Power Pivot gallery?