Share via


ExcelWebRenderer.CloseWorkbookSessions Property

Closes the current workbook before opening a new workbook.

Namespace:  Microsoft.Office.Excel.WebUI
Assembly:  Microsoft.Office.Excel.WebUI (in Microsoft.Office.Excel.WebUI.dll)

Syntax

'Declaration
<WebPartStorageAttribute(Storage.Shared)> _
<WebBrowsableAttribute(True)> _
<PersonalizableAttribute(PersonalizationScope.Shared)> _
Public Property CloseWorkbookSessions As Boolean
    Get
    Set
'Usage
Dim instance As ExcelWebRenderer
Dim value As Boolean

value = instance.CloseWorkbookSessions

instance.CloseWorkbookSessions = value
[WebPartStorageAttribute(Storage.Shared)]
[WebBrowsableAttribute(true)]
[PersonalizableAttribute(PersonalizationScope.Shared)]
public bool CloseWorkbookSessions { get; set; }

Property Value

Type: System.Boolean
true to close the current workbook before opening a new workbook; otherwise, false. The default is false.

Remarks

The workbook that is currently loaded in the session is closed if this property is set to true.

When you have finished using the session, it is good practice to close the workbook. This will close the session and free resources. This can improve performance when many users are viewing a workbook, but users lose the current state of the workbook when they open a new workbook.

See Also

Reference

ExcelWebRenderer Class

ExcelWebRenderer Members

Microsoft.Office.Excel.WebUI Namespace