SpreadsheetDocument.Create Method (String, SpreadsheetDocumentType)
Creates a new instance of the SpreadsheetDocument class from the specified file.
Namespace: DocumentFormat.OpenXml.Packaging
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Shared Function Create ( _
path As String, _
type As SpreadsheetDocumentType _
) As SpreadsheetDocument
'Usage
Dim path As String
Dim type As SpreadsheetDocumentType
Dim returnValue As SpreadsheetDocument
returnValue = SpreadsheetDocument.Create(path, type)
public static SpreadsheetDocument Create(
string path,
SpreadsheetDocumentType type
)
Parameters
- path
Type: System.String
The path and file name of the target Package for the OpenXmlPackage.
- type
Type: DocumentFormat.OpenXml.SpreadsheetDocumentType
The type of the SpreadsheetDocument.
Return Value
Type: DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
A new instance of SpreadsheetDocument.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when "path" is null reference. |