Navigation Menu

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

Exporting objects and Custom Column Headers #988

Closed
wants to merge 2 commits into from
Closed

Exporting objects and Custom Column Headers #988

wants to merge 2 commits into from

Conversation

Krooted
Copy link

@Krooted Krooted commented Feb 12, 2014

I needed the ability to export my custom grid headers to excel(WYSIWYG). I also needed the ability to export a specific property off of a child object that was embedded in my collection of objects.

Example:
$scope.myData = [{name: "Moroni", age: 50, features:{eyeColor:"brown", hairColor:"black"}},
{name: "Tiancum", age: 43, features:{eyeColor:"blue", hairColor:"black"}},
{name: "Jacob", age: 27, features:{eyeColor:"hazel", hairColor:"brunette"}},
{name: "Nephi", age: 29, features:{eyeColor:"brown", hairColor:"blonde"}},
{name: "Enos", age: 34, features:{eyeColor:"brown", hairColor:"red"}}];

Exporting features.eyeColor

Please see my before and after Plunkers
Before: http://plnkr.co/edit/EKSHFYR5iKeax5fmSVN2?p=preview
After: http://plnkr.co/edit/0pRgu6r8hMOibUkgx12L?p=preview

I needed the ability to export my custom grid headers to excel(WYSIWYG).  I also needed the ability to export a specific property off of a child object that was embedded in my collection of objects.

Example:
$scope.myData = [{name: "Moroni", age: 50, features:{eyeColor:"brown", hairColor:"black"}},
                 {name: "Tiancum", age: 43, features:{eyeColor:"blue", hairColor:"black"}},
                 {name: "Jacob", age: 27, features:{eyeColor:"hazel", hairColor:"brunette"}},
                 {name: "Nephi", age: 29, features:{eyeColor:"brown", hairColor:"blonde"}},
                 {name: "Enos", age: 34, features:{eyeColor:"brown", hairColor:"red"}}];

Exporting features.eyeColor 

Please see my before and after Plunkers
Before: http://plnkr.co/edit/EKSHFYR5iKeax5fmSVN2?p=preview
After: http://plnkr.co/edit/0pRgu6r8hMOibUkgx12L?p=preview
@c0bra
Copy link
Contributor

c0bra commented Apr 22, 2014

Can't merge as this doesn't pass jshint on travis, but this would be a nice addition to 3.0 once the CSV export plugin is added!

@c0bra c0bra closed this Apr 22, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants