Export (0) Print
Expand All

Workbooks.OpenXML Method 

Opens an XML data file. Returns a Workbook object.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim Filename As String
Dim Stylesheets As Object
Dim LoadOption As Object
Dim returnValue As Workbook
Dim workbooks1 As Workbooks
returnValue = workbooks1.OpenXML(Filename, Stylesheets, LoadOption)

Workbook OpenXML(
	[In] string Filename, 
	[In, Optional] object Stylesheets, 
	[In, Optional] object LoadOption
);
public Workbook OpenXML(
	/*in*/System.String Filename, 
	/*in*/System.Object Stylesheets, 
	/*in*/System.Object LoadOption
);
function OpenXML(
	 Filename : String, 
	 Stylesheets : Object, 
	 LoadOption : Object
) : Workbook;

Parameters

Filename

Required String. The name of the file to open.

Stylesheets

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

LoadOption

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.

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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft