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

Feature request: Heading order #13

Open
azhang opened this issue Oct 8, 2015 · 1 comment
Open

Feature request: Heading order #13

azhang opened this issue Oct 8, 2015 · 1 comment

Comments

@azhang
Copy link

azhang commented Oct 8, 2015

I can't find anywhere in the documentation or code (first time reading coffeescript so I might have missed it) if it's possible to specify heading order. I think it comes down to these lines?

  for key of row
    @_addCell(key, col)
    @cellMap.push(key)
    col += 1
  @_endRow()

Perhaps we can add a method to set cellMap manually, instead of using the first row? Since we can't rely on key ordering inside the row object, I don't see any other simple solution. What do you think?

@seanowenhayes
Copy link

Hi I have just done a little test and discovered that headers depend on the order keys are specified in the first object.
var data = [ { "Location": "Sweden", "Name": "Bob", }, { "Name": "Alice", "Location": "France" } ];

Would give the location in the first column and name in the second.

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