Range.ExportAsFixedFormat Method
Exports to a file of the specified format.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Sub ExportAsFixedFormat ( _
Type As XlFixedFormatType, _
Filename As Object, _
Quality As Object, _
IncludeDocProperties As Object, _
IgnorePrintAreas As Object, _
From As Object, _
To As Object, _
OpenAfterPublish As Object, _
FixedFormatExtClassPtr As Object _
)
'Usage
Dim instance As Range
Dim Type As XlFixedFormatType
Dim Filename As Object
Dim Quality As Object
Dim IncludeDocProperties As Object
Dim IgnorePrintAreas As Object
Dim From As Object
Dim To As Object
Dim OpenAfterPublish As Object
Dim FixedFormatExtClassPtr As Object
instance.ExportAsFixedFormat(Type, Filename, _
Quality, IncludeDocProperties, IgnorePrintAreas, _
From, To, OpenAfterPublish, FixedFormatExtClassPtr)
void ExportAsFixedFormat(
XlFixedFormatType Type,
Object Filename,
Object Quality,
Object IncludeDocProperties,
Object IgnorePrintAreas,
Object From,
Object To,
Object OpenAfterPublish,
Object FixedFormatExtClassPtr
)
Parameters
Type
Type: Microsoft.Office.Interop.Excel.XlFixedFormatTypeRequired XlFixedFormatType The type of file format to export to.
Filename
Type: System.ObjectOptional Object The file name of the file to be saved. You can include a full path, or short_Excel2007 saves the file in the current folder.
Quality
Type: System.ObjectOptional Object Typically formatted as a XlFixedFormatQuality. Specifies the quality of the published file.
IncludeDocProperties
Type: System.ObjectOptional Object set to True to include the document properties; otherwise False.
IgnorePrintAreas
Type: System.ObjectOptional Object set to True to ignore any print areas set when publishing; otherwise False.
From
Type: System.ObjectOptional Object The number of the page at which to start publishing. If this argument is omitted, publishing starts at the beginning.
To
Type: System.ObjectOptional Object The number of the last page to publish. If this argument is omitted, publishing ends with the last page.
OpenAfterPublish
Type: System.ObjectOptional Object set to True to display the file in the viewer after it is published; otherwise False.
FixedFormatExtClassPtr
Type: System.ObjectOptional Object Pointer to the FixedFormatExt class.
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.