将嵌套的json元素导出为ex​​cel [英] export nested json elements to excel

查看:149
本文介绍了将嵌套的json元素导出为ex​​cel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

i有像我发布的数据我需要将它转换为excel文件

i尝试了大多数在线解决方案但是没有结果有任何帮助吗?

json数据:

 {
id 0001
type donut
name Cake
< span class =code-string> ppu: 0 55
batters
{
batter
[
{ id 1001 < span class =code-string> type: Regular},
{ id 1002 type 巧克力},
{ id 1003 type < span class =code-string> Blueberry},
{ id 1004 type Devil's Food}
]
},
摘要
[
{ id 5001 type },
{ id 5002 type Glazed },
{ id 5005 输入 Sugar},
{ id 5007 type 粉糖},
{ id 5006 type 洒上巧克力},
{ id 5003 type 巧克力},
{ id 5004 type Maple}
]
}

解决方案

这是无法在Excel工作表上显示的数据,因为Excel只能显示简单的表,你有一个多级数据结构...

如果你的意思是使用二级值进行验证,你有两个选择:

1 。使用验证对话框直接在Excel工作表上执行此操作 - https://support.office.com/en-nz/article/Apply-data -validation-to-cells-c743a24a-bc48-41f1-bd92-95b6aeeb73c9 [ ^ ]

2.学习使用VSTO从代码创建Excel工作表: https://msdn.microsoft.com/en-us/library/office/fp179694.aspx [ ^ ]

hello
i have data like i posted bellow i need to convert it to excel file
i tried most of online solutions but there is no result any help please ?
json data :

{
	"id": "0001",
	"type": "donut",
	"name": "Cake",
	"ppu": 0.55,
	"batters":
		{
			"batter":
				[
					{ "id": "1001", "type": "Regular" },
					{ "id": "1002", "type": "Chocolate" },
					{ "id": "1003", "type": "Blueberry" },
					{ "id": "1004", "type": "Devil's Food" }
				]
		},
	"topping":
		[
			{ "id": "5001", "type": "None" },
			{ "id": "5002", "type": "Glazed" },
			{ "id": "5005", "type": "Sugar" },
			{ "id": "5007", "type": "Powdered Sugar" },
			{ "id": "5006", "type": "Chocolate with Sprinkles" },
			{ "id": "5003", "type": "Chocolate" },
			{ "id": "5004", "type": "Maple" }
		]
}

解决方案

This is data that can not be displayed on an Excel sheet as Excel can only display simple table, where you have a multilevel data structure...
If what you mean is to use the second-level values for validation, you have two options:
1. Do it directly on the Excel sheet using the Validation dialog - https://support.office.com/en-nz/article/Apply-data-validation-to-cells-c743a24a-bc48-41f1-bd92-95b6aeeb73c9[^]
2. Learn using VSTO for creating Excel sheet from code: https://msdn.microsoft.com/en-us/library/office/fp179694.aspx[^]


这篇关于将嵌套的json元素导出为ex​​cel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆