Version

Save(Stream,WorkbookSaveOptions) Method

Writes the workbook to a stream.
Syntax
public void Save( 
   Stream stream,
   WorkbookSaveOptions saveOptions
)

Parameters

stream
The stream to write the workbook to.
saveOptions
The options to use to save the stream or null to use the default options.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionstream is null.
System.InvalidOperationExceptionThe workbook has no worksheets in its Worksheets collection.
System.InvalidOperationExceptionNo worksheet in this workbook's Worksheets collection has its DisplayOptionsBase.Visibility set to Visible.
System.InvalidOperationExceptionA CustomView in the workbook's CustomViews collection has all worksheets hidden. At least one worksheet must be visible in all custom views.
Remarks

The workbook will be written in the format specified by the CurrentFormat.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also