Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ember-spreadsheet-export
Advanced tools
Provides ability to export a set of json data as excel or csv file.
Addon that encapsulates ability to render a data set as either excel or csv.
Forked from roofstock/ember-cli-data-export.
ember-cli-data-export
include:export-selector
and export-selector-onselect
components have been removed, in order to remove
the dependency on ember-select-list
, which hasn't been updated in a long timecsv
and excel
services are not automatically injectedexcel
service supports merging cells via an additional merges
optioncsv
service supports a new raw
option, which disables quoting and escaping of cell contentscsv
service supports a new autoQuote
option, which only quotes/escapes cells which need it
(those containing quotes, commas or newlines).excel
service accepts either a nested array or an HTMLTableElement
as data for any sheetember install ember-spreadsheet-export
[['Title 1', 'Title 2', 'Title 3'],['row1cell1', 'row1cell2', 'row1cell3'],['row2cell1', 'row2cell2', 'row2cell3']]
HTMLTableElement
instead of an array, and will parse the table.In order to merge cells, an array of merges
can be passed in the options
hash.
Each element of this array should be an object taking the following form:
{
s: {
r: 0,
c: 0,
},
e: {
r: 1,
c: 0,
},
}
s
defines the start of the range to be merged, and e
the end of the range.
Within each, r
is the row index and c
is the column index.
The example above would therefore merge the first two cells in the first column.
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
export default class MyComponent extends Component {
// Don't forget to inject the service(s) as needed
@service csv;
@service excel;
// Then go ahead and use it in your code
@action export() {
const data = [
['Title 1', 'Title 2', 'Title 3'],
['row1cell1', 'row1cell2', 'row1cell3'],
['row2cell1', 'row2cell2', 'row2cell3'],
];
if (type === 'MultiExcel') {
const sheets = [
{
name: 'Demo sheet',
data,
},
{
name: 'Supplemental sheet',
data: [
['Foo', 'Bar'],
['Baz', 'Foobar'],
],
},
{
name: 'HTML table',
data: document.querySelector('#data'),
},
];
this.excel.export(sheets, { multiSheet: true, fileName: 'test.xlsx' });
} else if (type === 'Excel') {
this.excel.export(data, { sheetName: 'sheet1', fileName: 'test.xlsx' });
} else if (type === 'CSV') {
this.csv.export(data, { fileName: 'test.csv', autoQuote: true });
}
}
}
FAQs
Provides ability to export a set of json data as excel or csv file.
The npm package ember-spreadsheet-export receives a total of 67 weekly downloads. As such, ember-spreadsheet-export popularity was classified as not popular.
We found that ember-spreadsheet-export demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.