Viewing Excel Files in Document Library history
Charles East from Kynetix pointed my attention to what seems (to me and to him) like a bug. If you ever tried using the "Version History" option inside Document Libraries, you probably noticed something interesting about the "View" button that's associated with the historical versions. It doesn't.
When you click it, you get the newest version of the file in EWA. I am still investigating if this is a bug (I would think it is) or just bad design. In the meantime, I wanted to clue you in on a workaround that will allow you to view historical versions of workbooks in EWA.
Step 1 - Make a hole in the box
!!! Security Warning !!!
This is probably the trickiest part of the workaround as it potentially opens your box up for misuse. To make this work, you need to add an item to the Trusted Locations list on the server. The issue is that once you do that, all workbooks that have history will be available for people to view in EWA, even if they are not in a trusted location. Depending on how your system works, this may or may not be acceptable, but be sure you understand the repercussions.
The trusted location you need to add is:
https://server_name/_vti_history/
Make sure to check the "Trust Children" option and to select as the "Location Type" the "HTTP" option.
Step 2 - Put your junk in the box
The next step is to build a link to the relevant item. To figure out the link, go to the history table and choose the file you are interested in seeing. For example:
https://server_name/_vti_history/1536/Shared%20Documents/Versions.xlsx
Armed with this, you can then go and build a link to the file:
https://server_name/_layouts/xlviewer.aspx?id=https://tsdd/_vti_history/1536/Shared%20Documents/Versions.xlsx
This instructs the Excel Viewer page to show the relevant file.
Step 3 - Make them open the box
Now, all a user needs to do is click on this link or paste it into the address bar to get EWA to show the correct version of the file.
While this workaround, as presented, is not for the every-day user, it should be relatively simple to create a SharePoint Web-Part that builds this link on the fly according to what document the user clicks.
Comments
- Anonymous
January 24, 2008
Has this issue been further resolved? Is there a bug with versions, and is there a more secure workaround? I would like to use minor/major versions of a workbook so that the author can make incremental changes, but all other viewers would see only his most recent "complete" version, until ready to replace it with a new "complete" version. But when I attempt to do so, the minor version displays in the EWA webpart as well as when I open it in the document library. Is the version feature not working as intended, or am I missing something?