question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[X ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Can you implement export of the datatable as a csv please?

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:9

github_iconTop GitHub Comments

23reactions
Hesessescommented, Jun 26, 2017

I agree that csv export has been a must feature for datatables lately. If you are not planning build it, would you give an example or any tips how to implement it with ngx-datatable. I think that would be really helpful for many developers 👍

3reactions
parthdevlopercommented, Sep 8, 2020

I have a better PRACTICAL solution for this.

In most of the cases, the data is comming from API.

So, it would be great if we convert the data to csv directly. Yes, It is possible…

Step 1 : npm install @ctrl/ngx-csv

Step 2 : module.ts

@NgModule({
 declarations: [
  ...
  ...
  ...
 ],
 imports: [
   ...
   CsvModule,
   ...
 ]
})

Step 3 : component.html

<a csvLink [data]="yourDataObject">CSV</a>

Hope you find this solution helpfull 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

export-to-csv - npm
Easily create CSV data from json collection. Latest version: 0.2.1, last published: 4 years ago. Start using export-to-csv in your project ...
Read more >
CSV Format – How to Open a .csv File and Export it
In this article, we are going to learn what a CSV file is, and how to open and export them using Microsoft Excel...
Read more >
How to export data into a CSV file - Apptio Targetprocess
Export option can be found under the Actions menu on any View. Just click the Export button to download a .CSV file. No...
Read more >
Export Data in CSV File Format - IBM
Procedure · Create a report. · Click the file button file icon and click Export CSV. You are prompted to open the file...
Read more >
How to Export Pandas DataFrame to a CSV File - Data to Fish
You can use the following template in Python in order to export your Pandas DataFrame to a CSV file: df.to_csv(r'Path where you want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found