This documentation is archived and is not being maintained.

Workbook.ExportAsFixedFormat Method (XlFixedFormatType, Object, Object, Object, Object, Object, Object, Object, Object)


Saves a workbook in PDF or XPS format.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

void ExportAsFixedFormat(
	XlFixedFormatType Type,
	object Filename,
	object Quality,
	object IncludeDocProperties,
	object IgnorePrintAreas,
	object From,
	object To,
	object OpenAfterPublish,
	object FixedFormatExtClassPtr


Type: Microsoft.Office.Interop.Excel.XlFixedFormatType

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

Type: System.Object

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

Type: System.Object

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

Type: System.Object

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

Type: System.Object

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

Type: System.Object

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

Type: System.Object

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

Type: System.Object

true to open the new file after exporting the workbook; otherwise, false.

Type: System.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.

You can save as a PDF or XPS file from Microsoft Office Excel only after you install an add-in that provides this feature. For more information, search for "Enable support for other file formats, such as PDF and XPS" on Office Online.

For information on optional parameters, see Optional Parameters in Office Solutions.

Return to top