You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

ember-cli-data-export

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
e

ember-cli-data-export

Provides ability to export a set of json data as excel or csv file.

0.1.22
74

Supply Chain Security

100

Vulnerability

99

Quality

86

Maintenance

100

License

Version published
Weekly downloads
306
-4.97%
Maintainers
1
Weekly downloads
 
Created

ember-cli-data-export

Addon that encapsulates ability to render a data set as either excel or csv.

Installation

  • ember install ember-cli-data-export

Usage

  • uses js-xlsx library for rendering excel content.
  • automatically injects a service for both excel and csv format
  • feed a datastructure that's an array of arrays, where each internal array is the set of data to be rendered for that row.
  • Example: [['Title 1', 'Title 2', 'Title 3'],['row1cell1', 'row1cell2', 'row1cell3'],['row2cell1', 'row2cell2', 'row2cell3']]

Example


   var data = [
       ['Title 1', 'Title 2', 'Title 3'],
       ['row1cell1', 'row1cell2', 'row1cell3'],
       ['row2cell1', 'row2cell2', 'row2cell3']
   ];

   if (type === 'Excel') {
     this.get('excel').export(data, 'sheet1', 'test.xlsx');
   } else if (type === 'CSV') {
     this.get('csv').export(data, 'test.csv');
   }

FAQs

Package last updated on 27 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts