Share via


Worksheet.ExportAsFixedFormat Method

Definition

Exports to a file of the specified format.

public void ExportAsFixedFormat (Microsoft.Office.Interop.Excel.XlFixedFormatType Type, object Filename, object Quality, object IncludeDocProperties, object IgnorePrintAreas, object From, object To, object OpenAfterPublish, object FixedFormatExtClassPtr);
abstract member ExportAsFixedFormat : Microsoft.Office.Interop.Excel.XlFixedFormatType * obj * obj * obj * obj * obj * obj * obj * obj -> unit
Public Sub ExportAsFixedFormat (Type As XlFixedFormatType, Optional Filename As Object, Optional Quality As Object, Optional IncludeDocProperties As Object, Optional IgnorePrintAreas As Object, Optional From As Object, Optional To As Object, Optional OpenAfterPublish As Object, Optional FixedFormatExtClassPtr As Object)

Parameters

Type
XlFixedFormatType

One of the Microsoft.Office.Interop.Excel.XlFixedFormatType values that specifies whether to save the workbook in PDF or XPS format.

Filename
Object

The full path of the new PDF or XPS file. If you omit this parameter, Excel saves the file in the current folder.

Quality
Object

One of the Microsoft.Office.Interop.Excel.XlFixedFormatQuality values that specifies the quality of the exported file.

IncludeDocProperties
Object

true to include document properties in the exported file; otherwise, false.

IgnorePrintAreas
Object

true to ignore any print areas set when exporting; otherwise, false.

From
Object

The number of the page at which to start exporting. If this argument is omitted, exporting starts at the first page.

To
Object

The number of the last page to export. If this argument is omitted, exporting ends with the last page.

OpenAfterPublish
Object

true to display the file in the viewer immediately; otherwise, false.

FixedFormatExtClassPtr
Object

A pointer to an implementation of the IMsoDocExporter interface that enables the workbook to be saved in a different fixed format. For more information, see Extending the Office (2007) Fixed-Format Export Feature.

Remarks

This method also supports initializing an add-in to export a file to a fixed-format file. For example, Excel will perform file format conversion if the converters are present. The conversion is usually initiated by the user.

Applies to