ExcelFilePage Class
Represents a workbook page.
- Inheritance:
- System.ObjectExcelFilePage
Properties
Height
Gets the page height in Points.
Property Value
- System.Double
The page height in Points.
PageContent
Gets the content of the page.
public FrameworkElement PageContent { get; }
Public ReadOnly Property PageContent As FrameworkElement
Property Value
- System.Windows.FrameworkElement
The content of the page.
Width
Gets the page width in Points.
Property Value
- System.Double
The page width in Points.
Methods
Save(Stream, SaveOptions)
Saves the workbook page in the specified stream.
public void Save(Stream stream, SaveOptions options)
Public Sub Save(stream As Stream, options As SaveOptions)
Parameters
stream
- System.IO.Stream
The stream in which to save the workbook page.
options
- SaveOptions
The saving options which can be used to define settings for save operation.
Remarks
Parameter options
, currently, must be of type PdfSaveOptions, XpsSaveOptions or ImageSaveOptions.
Save(String)
Saves the workbook page to a file with the specified path. Path must include file extension.
Parameters
path
- System.String
The path to which to save the workbook page.
Remarks
File extension that is extracted from the path
is used to create the appropriate SaveOptions derived class instance that is then passed to the Save(String, SaveOptions) method.
Following file extensions are supported:
- Portable Document Format: .pdf
- XML Paper Specification: .xps
- Image: .bmp, .gif, .jpg, .jpeg, .png, .tif, .tiff, .wdp
Exceptions
- System.ArgumentException
If file extension is not specified or not supported. If file extension is not recognized, use Save(String, SaveOptions) method overload instead.
Save(String, SaveOptions)
Saves the workbook page to a file with the specified path.
public void Save(string path, SaveOptions options)
Public Sub Save(path As String, options As SaveOptions)
Parameters
path
- System.String
The path to which to save the workbook page.
options
- SaveOptions
The saving options which can be used to define settings for save operation.
Remarks
Parameter options
, currently, must be of type PdfSaveOptions, XpsSaveOptions or ImageSaveOptions.