내보내기(0) 인쇄
모두 확장

Workbooks.OpenXML Method (Excel)

Office 2010

Opens an XML data file. Returns a Workbook object.

.OpenXML(Filename, Stylesheets, LoadOption)

A variable that represents a Workbooks object.

Parameters

Name

Required/Optional

Data Type

Description

Filename

필수

String

The name of the file to open.

Stylesheets

선택

Variant

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

LoadOption

선택

Variant

Specifies how Excel opens the XML data file. Can be one of the XlXmlLoadOption constants.

Return Value

Workbook

XlXmlLoadOption can be one of these XlXmlLoadOption constants.

xlXmlLoadImportToList Automatically creates an XML List and imports data into the list.

xlXmlLoadMapXml Loads the XML file into the XML Source task pane.

xlXmlLoadOpenXml Open XML files in the same way that Excel 2002 opens XML files (for backwards compatibility only).

xlXmlLoadPromptUser Prompts the user and lets them choose the Import method.

The following code opens the XML data file "customers.xml" and displays the file's contents in an XML list.

Sub UseOpenXML() 
 Application.Workbooks.OpenXML _ 
 Filename:="customers.xml", _ 
 LoadOption:=xlXmlLoadImportToList 
End Sub
Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
표시:
© 2015 Microsoft