MS Access 创建 XML

发布于 2024-10-04 05:27:58 字数 223 浏览 4 评论 0原文

我有一个来自客户的示例文件,需要将架构与我的 MS 数据库中各个表中的数据进行匹配。

尝试编写查询并导出 XML,但它过于简化了 XML,并假设查询中的每一行都是单个节点,并且所有数据元素都属于该节点的每个实例。

有没有办法设置一个架构(可能通过导入我的示例文件来构建它),然后将字段映射到该架构以进行导出?

如果碰巧它更适合的话,我愿意使用 Excel - 只是认为访问关系会更好。

I have a sample file from a customer and need to match the schema with data from various tables in my MS Database.

Tried writing a query and exporting the XML but it oversimplifies the XML and assumes that each row from the query is a single node and all the data elements fall under each instance of that node.

Is there a way to setup a schema (possibly build it by importing my sample file) and then map fields to that for the export?

I'm open to using Excel if by chance it is better suited - just figured the access relationships would be better.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乙白 2024-10-11 05:27:59

也许您正在寻找类似的内容:

Sub ExportCustomerOrderData()

    Dim objOrderInfo As AdditionalData

    Dim objOrderDetailsInfo As AdditionalData



    Set objOrderInfo = Application.CreateAdditionalData



    '' Add the Orders and Order Details tables to the data to be exported.

    Set objOrderDetailsInfo = objOrderInfo.Add("Orders")

    objOrderDetailsInfo.Add "Order Details"



    '' Export the contents of the Customers table. The Orders and Order

    '' Details tables will be included in the XML file.

    Application.ExportXML ObjectType:=acExportTable, DataSource:="Customers", _

                          DataTarget:="Customer Orders.xml", _

                          AdditionalData:=objOrderInfo

End Sub

来自: http://msdn.microsoft.com /en-us/library/ff193212.aspx

Perhaps you are looking for something like:

Sub ExportCustomerOrderData()

    Dim objOrderInfo As AdditionalData

    Dim objOrderDetailsInfo As AdditionalData



    Set objOrderInfo = Application.CreateAdditionalData



    '' Add the Orders and Order Details tables to the data to be exported.

    Set objOrderDetailsInfo = objOrderInfo.Add("Orders")

    objOrderDetailsInfo.Add "Order Details"



    '' Export the contents of the Customers table. The Orders and Order

    '' Details tables will be included in the XML file.

    Application.ExportXML ObjectType:=acExportTable, DataSource:="Customers", _

                          DataTarget:="Customer Orders.xml", _

                          AdditionalData:=objOrderInfo

End Sub

From: http://msdn.microsoft.com/en-us/library/ff193212.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文