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

Returns only new lines #64

Open
iDomas opened this issue Jul 19, 2018 · 4 comments
Open

Returns only new lines #64

iDomas opened this issue Jul 19, 2018 · 4 comments

Comments

@iDomas
Copy link

iDomas commented Jul 19, 2018

Data format I use:

[
    {
        firstColumn: "column1"
        secondColumn: "column2"
        thirdColumn: "column3"
        fourthColumn: "column4"
    }
]

Code I use to generate csv:
new Angular2Csv(exportData, 'report')

Here is object of Angular2csv in console:

Angular2Csv {csv: ↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵", 
data: Array(37), _options: {…}}
csv:"↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵↵"
data:(37) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
_options:
{filename: "report", fieldSeparator: ",", quoteStrings: """, decimalseparator: ".", showLabels: false, …}

P.S. If I use headers, then headers are written to csv, but data is not.

@javiertelioz
Copy link
Owner

Hello

I have already released a new version, I hope to correct these problems, change the way to use and install, I hope it is not an inconvenience to use this library, I will continue to add new features.

regards

@iDomas
Copy link
Author

iDomas commented Jul 20, 2018

Now I get error:
node_modules/angular2-csv/Angular2-csv"' has no exported member 'Angular2Csv'.
P.S. Im using Angular 6

@gcampa
Copy link

gcampa commented Jul 20, 2018

got the same error here:
node_modules/angular2-csv/angular2-csv"' has no exported member 'Angular2Csv'
angular 4.3.6

@jamiehankins
Copy link

Javier, your readme only shows using your component as part of a template. Can we still use it by calling it like this?
new Angular2Csv(this.rowData, 'EventLog', options);
When I look at your readme, I only see the options and data in the component, and the calling is only done in the template, which is not what we want. When I look through the source in my node_modules, I don't see a Angular2Csv object, which would be why we see the error "...node_modules/angular2-csv/angular2-csv"' has no exported member 'Angular2Csv'.

Thanks,
Jamie

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

4 participants