VBA/Excel/Access/Word/Access/Access XML
Содержание
Emport table as XML file
<source lang="vb">
Sub TestExportXML()
Application.ExportXML acExportTable, "tblEmployees", "c:\Employees.xml", "c:\ExmployeesSchema.xml"
End Sub
</source>
Export to an XML file
<source lang="vb">
Sub ExportcustXML()
Application.ExportXML _ ObjectType:=acExportTable, DataSource:="Employees", DataTarget:="c:\Companyxml.xml", _ SchemaTarget:="CompanySchema.xml", _ OtherFlags:=1
End Sub
</source>
Import an XML file
<source lang="vb">
Sub ImportXML(path As String)
Application.ImportXML DataSource:=path, ImportOptions:=acStructureAndData
End Sub
</source>
Import XML file
<source lang="vb">
Sub TestImportXML()
Application.ImportXML "c:\Employees.xml", acStructureAndData
End Sub
</source>