Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what should i do? #14

Closed
Z-Rainbow-Cat opened this issue Aug 23, 2021 · 1 comment
Closed

what should i do? #14

Z-Rainbow-Cat opened this issue Aug 23, 2021 · 1 comment

Comments

@Z-Rainbow-Cat
Copy link

Z-Rainbow-Cat commented Aug 23, 2021

problem

I use it to export excel, but the data he exported is not correct! It only exports the last piece of data, and the number of data is the same, that is, it exports a lot of repeated last pieces of data

2.0.0 version is ok,but 3.1.0 and 3.1.1 not ok

import Json2excel from "custom-json2excel";
let keyMap = {
  cout: "数量"
  one: "一组"
  two: "三组"
  three: "二组"
  four: "四组"
  type: "类型"
}
let data = [
{
  cout: "8"
  one: "7"
  two: "4"
  three: "1"
  four: "0"
  type: "1"
},
{
  cout: "8"
  one: "7"
  two: "6"
  three: "1"
  four: "8"
  type: "1"
},
{
  cout: "8"
  one: "7"
  two: "1"
  three: "1"
  four: "0"
  type: "1"
},
{
  cout: "3"
  one: "7"
  two: "0"
  three: "1"
  four: "0"
  type: "1"
},
{
  cout: "9"
  one: "4"
  two: "2"
  three: "1"
  four: "2"
  type: "1"
},
]
let nane="测试"
const json2excel = new Json2excel({ data, keyMap, name })
json2excel.generate()
@asasugar
Copy link
Owner

请使用v3.1.2版本!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants