Workbook.XmlImportXml method (Excel)
Imports an XML data stream that has been previously loaded into memory. Excel uses the first qualifying map found, or if the destination range is specified, Excel automatically lists the data.
Syntax
expression.XmlImportXml (Data, ImportMap, Overwrite, Destination)
expression A variable that represents a Workbook object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Data | Required | String | The data to import. |
ImportMap | Required | XmlMap | The schema map to apply when importing the file. |
Overwrite | Optional | Variant | If a value is not specified for the Destination parameter, this parameter specifies whether to overwrite data that has been mapped to the schema map specified in the ImportMap parameter. Set to True to overwrite the data or False to append the new data to the existing data. The default value is True. If a value is specified for the Destination parameter, this parameter specifies whether to overwrite existing data. Set to True to overwrite existing data or False to cancel the import if data would be overwritten. The default value is True. |
Destination | Optional | Variant | Specifies the range where the list will be created. Excel only uses the top-left corner of the range. |
Return value
Remarks
Don't specify a value for the Destination parameter if you want to import data into an existing mapping.
The following conditions cause the XmlImport method to generate run-time errors:
The specified XML data contains syntax errors.
The import process was cancelled because the specified data cannot fit into the worksheet.
If no qualifying maps are found and the destination range was not specified.
Use the XMLImport method of the Workbook object to import an XML data file into the current workbook.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기