Skip to main content

DocumentManager.CloseAllDocuments() Method

Closes all open documents.

Namespace: DevExpress.Web.Office

Assembly: DevExpress.Web.v22.1.dll

NuGet Package: DevExpress.Web


public static void CloseAllDocuments()


The CloseAllDocuments method closes all open documents and clears all the session parameters, including the Rich Text Editor/Spreadsheet settings.



The CloseAllDocuments method is not in effect when a custom StateProvider is used.

We recommend that you use the CloseDocument(String) method to close only specific documents specified by the document ID.


When you close a document, DocumentManager closes it for all users who work on the document. It can cause NullReferenceException and “Your session has expired” errors. To avoid these errors, close unshared documents only.

See Also