0

我正在尝试使用他们的 API 使用来自 Web 源的数据填充 Excel 工作簿。当我连接到数据源时,会出现高级查询编辑器并且我可以浏览数据,它的行为有点像 Access 数据库应用程序。当我选择“转换为表格”时,Excel 基本上将数据源的顶层放入 excel 工作簿中,我无法深入研究记录。这是一个很难解释的问题。

以下是 API 调用返回的内容(这是一条记录)

{"TotalResults":1,"ReturnedResults":1,"Results":[{"DueDate":"2018-10-31T00:00:00Z","FromDocument":"","AllowOnlinePayment":true,"Paid ":false,"Status":"Unpaid","Locked":false,"CustomerId":3148838,"CustomerName":"Cell C Limited","Customer":{"Name":"Cell C Limited"," SalesRepresentativeId":37307,"TaxReference":"4870194356","ContactName":"Charlene","Telephone":"0847770913","Fax":"","Mobile":"","Email":"csandstrom@ cellc.co.za;accountspayable@cellc.co.za;EDC@cellc.co.za","WebAddress":"","Active":true,"IsObfuscated":false,"Balance":2333157.4800,"CreditLimit":0.0,"CommunicationMethod":2,"PostalAddress01":"Cell C","PostalAddress02":"Waterfall Campus","PostalAddress03":"C/O Maxwell Drive and Pretoria Road","PostalAddress04":"Buccleuch","PostalAddress05":"","DeliveryAddress01":"September 2018 Print & Post Distribution","DeliveryAddress02":"","DeliveryAddress03":"","DeliveryAddress04 ":"","DeliveryAddress05":"PO: TBC","AutoAllocateToOldestInvoice":false,"EnableCustomerZone":false,"CustomerZoneGuid":"b9e1fbab-a23d-438c-b064-7a17d0a4dd56","CashSale":false,"TextField1":"","TextField2":"","TextField3":"","YesNoField1":false,"YesNoField2":false,"YesNoField3":false,"DefaultPriceListName":"默认价目表","AcceptsElectronicInvoices ":false,"修改":"2018-10-18T12:46:49.01","创建":"2018-10-18T12:42:31.233","HasActivity":true,"ID":3148838}," SalesRepresentativeId":37307,"SalesRepresentative":{"ID":37307,"FirstName":"David","LastName":"Markman","Name":"David Markman","Active":true,"Email" :"davidm@infoslipsconnect.com","手机":"","电话":"","已创建":"2018-10-18T12:42:31.233","修改":"2018-10-18T12:46:49.01"},"修改":"2018-10-18T12:46:49.01","创建":"2018 -10-18T12:42:31.233","ID":483959431,"Date":"2018-10-18T00:00:00Z","Inclusive":false,"DiscountPercentage":0.0,"TaxReference":"4870194356 ","DocumentNumber":"INV03357","Reference":"14480 - October Print & Post","Message":"新银行详细信息:\n账户名称: Infoslips Connect (Pty) Ltd\n银行: Investec Bank Limited\n分行: 100 Grayston Drive - 58 01 05\n帐号: 10011832402\n请将付款证明转发至 accounts@infoslipsconnect.com\n","Discount":0.0000,"Exclusive":98243.0400,"Tax":14736.4600,"四舍五入":0.0000,"Total":112979.5000,"AmountDue":112979.5000,"PostalAddress01":"Cell C","PostalAddress02":"Waterfall Campus","PostalAddress03":"C/O Maxwell Drive and Pretoria Road", "PostalAddress04":"Buccleuch","PostalAddress05":"","DeliveryAddress01":"2018 年 9 月打印和邮政分发","DeliveryAddress02":"","DeliveryAddress03":"","DeliveryAddress04":""," DeliveryAddress05":"PO: TBC","Printed":true,"Editable":true,"HasAttachments":false,"HasNotes":false,"HasAnticipatedDate":false,"Lines":[{"SelectionId":4804411 ,"TaxTypeId":2691481,"ID":328907379,"Description":"CELL C PRINT & POST","LineType":0,"Quantity":1.0000,"UnitPriceExclusive":0.0000,"Unit":"","UnitPriceInclusive":0.0000,"TaxPercentage ":0.15,"DiscountPercentage":0.0,"Exclusive":0.0000,"Discount":0.0000,"Tax":0.0000,"Total":0.0000,"Comments":"","AnalysisCategoryId1":16041,"UnitCost" :0.0000},{"SelectionId":12926677,"TaxTypeId":2691481,"ID":328907380,"Description":"CellC: PDF Compiled","LineType":0,"Quantity":52926.0000,"UnitPriceExclusive": 0.3400,"Unit":"","UnitPriceInclusive":0.3900,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":17994.8400,"Discount":0.0000,"Tax":2699.2300,"Total":20694.0700,"Comments":"","AnalysisCategoryId1":16041,"UnitCost":0.0000},{ "SelectionId":12926854,"TaxTypeId":2691481,"ID":328907382,"Description":"CellC: 舍入差异","LineType":0,"Quantity":1.0000,"UnitPriceExclusive":-238.1600,"Unit ":"","UnitPriceInclusive":-273.8800,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":-238.1600,"Discount":0.0000,"Tax":-35.7200,"Total":-273.8800 ,"评论":"","AnalysisCategoryId1":16041,"UnitCost":0.0000},{"SelectionId":12926687,"TaxTypeId":2691481,"ID":328907383,"Description":"CellC: PDF Print","LineType":0,"Quantity":109782.5000,"UnitPriceExclusive":0.7300,"Unit": "","UnitPriceInclusive":0.8300,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":80141.2300,"Discount":0.0000,"Tax":12021.1800,"Total":92162.4100,"Comments":" ","AnalysisCategoryId1":16041,"UnitCost":0.0000},{"SelectionId":12926854,"TaxTypeId":2691481,"ID":328907384,"Description":"CellC: 舍入差异","LineType":0 ,"数量":1.0000,"UnitPriceExclusive":-87.8200,"单位":"","UnitPriceInclusive":-100.9900,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":-87.8200,"Discount":0.0000,"Tax":-13.1700,"Total":-100.9900,"Comments":" ","AnalysisCategoryId1":16041,"UnitCost":0.0000},{"SelectionId":12926687,"TaxTypeId":2691481,"ID":328907385,"Description":"CellC: Hand Delivery","LineType":0 ,"数量":2.0000,"UnitPriceExclusive":0.3400,"Unit":"","UnitPriceInclusive":0.3900,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":0.6800,"Discount":0.0000, "税":0.1000,"总计":0.7800,"评论":"","AnalysisCategoryId1":16041,"UnitCost":0.0000},{"SelectionId":12926854,"TaxTypeId":2691481,"ID":328907386,"Description":"CellC: 舍入差异","LineType":0,"Quantity":1.0000," UnitPriceExclusive":-0.0100,"Unit":"","UnitPriceInclusive":-0.0100,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":-0.0100,"Discount":0.0000,"Tax":0.0000 ,"Total":-0.0100,"Comments":"","AnalysisCategoryId1":16041,"UnitCost":0.0000},{"SelectionId":12926761,"TaxTypeId":2691481,"ID":328907387,"Description" :"CellC: Nixie","LineType":0,"Quantity":1.0000,"UnitPriceExclusive":432.2800,"Unit":"","UnitPriceInclusive":497.1200,"TaxPercentage":0.15,"DiscountPercentage":0.0,"Exclusive":432.2800,"Discount":0.0000,"Tax":64.8400,"Total":497.1200,"Comments":" ","AnalysisCategoryId1":16041,"UnitCost":0.0000}]}

我的问题是,我需要能够引用查询返回的数据,但不能这样做,因为一旦我转换为表格,数据似乎就不存在了。实现这一目标的最佳方法是什么?

结果如下截图:

在此处输入图像描述

在此处输入图像描述 不确定我是否对此有意义。

谢谢,史蒂文

4

1 回答 1

1

通过在 M Code 和查询编辑器上观看一些 YouTube 视频,我设法做到了这一点。我需要做的就是扩展列以将结果中的数据放入同一个表中。你肯定让我指出了正确的方向。

于 2018-10-19T09:04:39.570 回答