[SheetJS/js-xlsx修改表头json_to_sheet修改表头_Aqvdrt的博客-CSDN博客](https://blog.csdn.net/qq_37027371/article/details/106022855)
看官方文档看到的,记录一下,帮大家踩坑。
//待展示的数据,可能是从后台返回的json数据或者是自己定义的object
const data = [
{ S:1, h:2, e:3, e_1:4, t:5, J:6, id:7 },
{ S:2, h:3, e:4, e_1:5, t:6, J:7, id:8 }
];
//展示的顺序,把data中对象的属性按照你想要的顺序排放就可以了,我这里把id移到了第一列展示
const header = ["id", "S","h","e","e_1","t","J"];
var worksheet = XLSX.utils.json_to_sheet(data, {header:header})
标签:xlsx,sheet,表头,SheetJS,修改,json,id From: https://www.cnblogs.com/ministep/p/17569591.html