A session is a way to manage interaction with a workbook on Office SharePoint Server Web site servers. The following sections describe what a session is, how you create and terminate a session, how a session time-out can affect you, and how to manage the view of and interaction with a workbook in Excel Services.
What do you want to do?
What is a session?
A session is a unique unit of work context that is created for identifying and performing workbook operations. This session is created as needed, exists for a predefined, maximum time period set by a system administrator, and then terminates, either explicitly by a user or implicitly when a time-out occurs. The primary benefit of a session is that it maintains the interactions you make to the workbook, such as sorting and filtering, for the life of the session while also optimizing calculations during the session. A session is used to also help balance workload on server computers and to prevent a few users from using too many system resources, such as CPU and memory, at the expense of other users. During a session, interactions that you or another user make are private and isolated. For example, if you sort data in Excel Services and another user filters data in Excel Services, you see your sort interactions, the other user sees his or her filter interactions, but neither of you sees each other's interactions.
When you open a workbook in Excel Services, the session is created, and the latest version of the workbook is loaded. Once the workbook is associated with a session, any changes that you or another user make to that version of the workbook in the document library are not reflected in the current session. For example, if another user updates the workbook in Microsoft Office Excel and saves it again to the same document library, you won't see those changes in your current session.
Although there can only be one Excel workbook open per session, the same workbook may be opened in multiple sessions at the same time by multiple users. Furthermore, a user may have more than one session open at any one time, with the same workbook or a different workbook. In an enterprise where there are many users, there can be many different workbooks open in many different sessions. However, there is always one workbook for each user and for each session.
Even though only one user is associated with a session, a user can create several sessions of the same workbook. For example, you might want to compare different views of the same worksheet in a workbook between two Web Part pages each in a separate window by using the New Window command under the File menu in Internet Explorer. Or you might want to compare two different workbooks in two different instances of the Excel Web Access Web Part on the same Web Part page. Note, however, that you can never have two or more Excel Web Access Web Parts displayed on one Web Part page that share the same session.
How to create and terminate a session in Excel Services
In general, you create a session when you open an Excel workbook and you terminate a session when you close that workbook, but there are several ways to create and terminate a session.
In Excel Services, you create a new session when you do the following:
Display Excel Services with a loaded workbook specified in the Workbook property.
Reload a workbook by using the Reload Workbook command under the Open menu on the Excel Web Access toolbar. This command always uses the latest version of the workbook.
Open an Excel workbook in a browser from a document library. (Point to the item, click the arrow next to it, and then click View in Web Browser.)
Display a Web Part page, such as a dashboard, that contain an Excel Web Access Web Part.
Use a Web Part connection to pass the URL of an Excel workbook, for example, from the List View Web Part of a document library to the Excel Access Web Part.
Click the OK or Apply buttons in the Web Part tool pane to update an Excel Web Access Web Part property.
In Excel Services, you terminate the current session when you do the following:
Allow the session to time out.
Open an Excel workbook in the Excel Web Access Web Part when the Close Session Before Opening a New One property is selected.
Use a Web Part connection, to pass the URL of an Excel workbook, for example, from the List View Web Part of a document library to the Excel Access Web Part when the Excel Web Access Web Part Close Session Before Opening a New One property is selected.
Set the Excel Web Access Web Part Help Mode common property under the Advanced section in the tool pane to Navigate, and then click the Help button on the Excel Web Access toolbar.
What happens when you interact with data in Excel Services and a session time-out occurs
Once you open a workbook in Excel Services, you can either view or interact with the workbook to see different results. For example, you can sort, filter, refresh data, or set parameters. These interactions occur within the session but do not change the workbook currently loaded into Excel Services. These interactions are also temporary, and so when a session time-out occurs, the interactions are not saved, and there are no changes made to the original workbook.
If you click Refresh on the Internet Explorer toolbar, you refresh the current view of the workbook, but your session does not terminate. If you click Back or Forward on the Internet Explorer toolbar, your session does not terminate. If you close the browser window, your session terminates.
A session time-out can occur even while you are interacting with Excel Services. For example, you might be sorting and filtering data, and then you go to lunch or a meeting before you finish your interaction. When the session time-out occurs, a message explains that the interactions with the data have not been saved. The next time that you open the workbook, either the original version of the workbook is loaded, or if the workbook has been updated in Excel and saved to the same document library or network folder, then that new version is loaded.
Saving the view in Excel Services before a session time-out
It's a good idea to find out from your system administrator what the value of a session time-out is so that you can plan your interaction with Excel Services and make sure that you have enough time to complete your interactions before a session time-out.
After interacting with a workbook in Excel Services, if you want to save the current view, you can do the following:
Print the current view.
Open a workbook or snapshot in Excel on your computer and save it. For more information, see Open a workbook or snapshot in Excel from Excel Services.