Filesaver.js: Issues saving csv

Created on 5 Dec 2014  路  1Comment  路  Source: eligrey/FileSaver.js

Hi,

Great work on the package :+1:
Can you please let me know how should I convert my MongoDB collections in order to have them saved in a csv? My code is the following:

var ordersToExport = Orders.find({_id :{$in: orderIds}});
//var csvFormat = something to do with the ordersToExport
var blob = new Blob([ordersToExport], {type: "text/plain;charset=utf-8;",});
saveAs(blob, "orders.csv");

Thank you, I appreciate it!

>All comments

Never mind :) I found it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

capaj picture capaj  路  4Comments

profile4vaibhav picture profile4vaibhav  路  5Comments

ezequiel88 picture ezequiel88  路  4Comments

bholyfield picture bholyfield  路  6Comments

meenucoditas picture meenucoditas  路  6Comments