mysql - 我无法将从数据库中提取的数据导出为 Node.JS 中的 Excel (.csv) 或 (xlsx) 格式
问题描述
我正在以 Json 格式从数据库中获取数据。
[
{
"name": "Raj",
"age": 20,
"fav-color": "blue"
},
{
"name": "Rahul",
"age": 23,
"fav-color": "green"
},
{
"name": "Vijay",
"age": 21,
"fav-color": "white"
},
]
我希望将它放入 Excel 文件中,例如,
姓名|年龄|最喜欢的颜色
拉吉| 20| 蓝色的
拉胡尔|23 | 绿色
维杰|21 | 白色的
解决方案
You can use json parser to read the json document and exporting it into an excel file in your desired format using poi package.
推荐阅读
- javascript - 如何修复 react-timeago 不自行更新
- microsoft-dynamics - 动态门户 启用门户的上次登录联系人
- c# - 如何通过 Swagger UI 通过 ASP.net C# 控制器上传小文件?
- c++ - 我如何弄清楚为什么我的默认移动赋值运算符与“隐式异常规范”不匹配
- autodesk-forge - 如何使用窗口选择来选择对象 feom 2d sheet
- javascript - 我怎样才能在 discord.js v12 中锁定这个命令?
- php - 如何在 Laravel 的文件上传中检测特定的字符名称?
- python - 将 concurrent.futures.ProcessPoolExecutor 与 DataFrame.GroupBy 一起使用
- algorithm - 查找给定数组的值与排除组合的最佳组合
- z3 - 在 Z3py 的 forall 中定义量词变量问题