allenzeng / download-csv Goto Github PK
View Code? Open in Web Editor NEWjavascript download csv file
javascript download csv file
Examples are not clear.. Give an example that can be downloable and run locally
Could you add a license to this repo that matches what is declared on NPM, the isc
license? https://www.npmjs.com/package/download-csv
Example
var data = [{
name: "Test, Name",
count: 12
}]
downloadCsv(data, ['name', 'count'], 'test');
this will make 3 columns instead of 2
When I downloaded the file then filename is showing 'Unknown'.
When I checked your code
You have commented filename for Safari Web Browser
https://github.com/AllenZeng/download-csv/blob/master/lib/downloadFile.js#L36
I think, If you commented out this line then it should work
This error is coming tell me what i have to do.
const downloadCsv = require('download-csv');
const data = [
{
state: 'Maryland',
capital: 'Annapolis',
population: 38394
},
{
state: 'New York',
capital: 'Albany',
population: 97856
},
{
state: 'New Mexico',
capital: 'Santa Fe',
population: 75764,
},
{
state: 'Gujarat',
capital: 'GandhiNagar',
population: 75764,
continent: "Asia"
},
];
const fields = ['State', 'Capital', 'Population','Continent'];
downloadCsv(data,fields,'data.csv');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.