我有多个Microsoft Access表,我想导出到一个
XML文件.如何将表的顺序和层次结构操作到我想要的XML结构中?从本质上讲,我希望能够反转导入XML过程,该过程会自动将数据分解为多个表.我可以使用VBA,sql和任何内置的导出功能.
我使用附件在大约五分钟内生成一个300万行嵌套xml.
原文链接:https://www.f2er.com/xml/292075.html有两个关键项目,
1)一个简单的VB,
Public Function Export_ListingData() Dim objOtherTbls As AdditionalData On Error GoTo ErrorHandle Set objOtherTbls = Application.CreateAdditionalData objOtherTbls.Add "ro_address" objOtherTbls.Add "ro_buildingDetails" objOtherTbls.Add "ro_businessDetails" objOtherTbls.Add "ro_businessExtras" objOtherTbls.Add "ro_businessExtrasAccounts" objOtherTbls.Add "ro_businessExtrasAccom" objOtherTbls.Add "ro_businessExtrasAccom2" Application.ExportXML ObjectType:=acExportTable,_ DataSource:="ro_business",_ DataTarget:="C:\Users\Steve\Documents\Conversions\ListData.xml",_ AdditionalData:=objOtherTbls Exit_Here: MsgBox "Export_ListingData completed" Exit Function ErrorHandle: MsgBox Err.Number & ": " & Err.Description Resume Exit_Here End Function
2)使用从主键到FOREIGN键的连接来链接关系管理器中的表.