×
英语
很抱歉。本文没有你的语言版本。

Connect to a JSON file

You can create a dynamic connection between an Excel workbook and a JSON file, then refresh the connection whenever the JSON data changes.

Use Excel's Get & Transform (Power Query) experience to connect to a JSON file.

  1. Click the Data tab, then Get Data > From File > From JSON.

  2. Browse to your JSON file location, select it, and click Open.

  3. Once the Query Editor has loaded your data, click Convert > Into Table, then Close & Load.

You can also use the Query Editor to create formulas to connect to JSON files. If you don't see the Get Data button, you can go to New Query > From Other Sources > Blank Query, then go to Advanced Editor and input your custom query string.

let

Source = Json.Document(File.Contents("C:\Users\Name\Desktop\JSONTest.json")), #"Converted to Table" = Record.ToTable(Source)

in

#"Converted to Table"

You can also use the Query Editor to create formulas to connect to JSON files. In the Power Query ribbon tab, click From Other Sources > Blank Query, then go to Advanced Editor and input your custom query string.

let

Source = Json.Document(File.Contents("C:\Users\Name\Desktop\JSONTest.json")), #"Converted to Table" = Record.ToTable(Source)

in

#"Converted to Table"

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Power Query is known as Get & Transform in Excel 2016

Import data from external data sources

扩展你的 Office 技能
了解培训
抢先获得新功能
加入 Office 预览体验计划

此信息是否有帮助?

谢谢您的反馈!

谢谢你的反馈! 可能需要转接到 Office 支持专员。

×