Create a Document

Call the New() method to create a document.

A new document has an empty DocumentID value, thus the document is not accessible from the DocumentManager API. The ASPxSpreadsheet retains such a document until the control switches to another document.

The ASPxSpreadsheet generates a DocumentID value for the document when a user saves it to a file system. Alternatively, you can assign a GUID to the DocumentId property explicitly:

ASPxSpreadsheet1.New();
ASPxSpreadsheet1.DocumentId = Guid.NewGuid().ToString();

If the specified DocumentID value is not unique within all open documents, the ASPxSpreadsheet throws an exception. Call the GetAllDocuments() method to get identifiers of all open documents.