public static Workbook Load( Stream stream, WorkbookLoadOptions loadOptions )
Exception | Description |
---|---|
System.ArgumentException | stream does not contain valid Microsoft Excel file contents. |
System.ArgumentException | The file format cannot be determined from the specified stream. |
System.InvalidOperationException | The format of the workbook data is in an unsupported format. |
System.NotSupportedException | The workbook being loaded is in an Excel 2007 format and the CLR 2.0 Excel assembly is being used. The overload taking an Infragistics.Documents.Core.Packaging.IPackageFactory must be used in this case so the Excel 2007 file package can be accessed. |
Infragistics.Documents.Core.DocumentEncryptedException | Occurs when the workbook is encrypted. |
When loading the workbook, the format will be determined the file extension or by the contents of the file. If a FileStream is specified, the extension of the file will be examined. If the extension is a standard Excel format extension, the workbook will be assumed to be in the corresponding format. Otherwise, the contents of the file will be examined to try to determine the format. The CurrentFormat of the returned workbook will indicate the format the workbook was loaded from.
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+