Edit

Share via


Workbooks.OpenXML(String, Object, Object) Method

Definition

Opens an XML data file. Returns a Workbook object.

public Microsoft.Office.Interop.Excel.Workbook OpenXML (string Filename, object Stylesheets, object LoadOption);
Public Function OpenXML (Filename As String, Optional Stylesheets As Object, Optional LoadOption As Object) As Workbook

Parameters

Filename
String

Required String. The name of the file to open.

Stylesheets
Object

Optional Object. Either a single value or an array of values that specify which XSL Transformation (XSLT) style sheet processing instructions to apply.

LoadOption
Object

Optional Object. Specifies how Excel opens the XML data file. Can be one of these XlXmlLoadOption constants:xlXmlLoadImportToList Places the contents of the XML data file in an XML list.xlXmlLoadMapXml Displays the schema of the XML data file in the XML Structure task pane.xlXmlLoadOpenXml Opens the XML data file. The contents of the file will be flattened.xlXmlLoadPromptUser Prompts the user to choose how to open the file.

Returns

Remarks

XML features, except for saving files in the XML Spreadsheet format, are available only in Microsoft Office Professional Edition 2003 and Microsoft Office Excel 2003.

Applies to