On Monday, February 15, 2016 at 1:03:30 AM UTC+5:30, A wrote: > > I save it as csv which opens nicely in excel > I use this example > http://jsfiddle.net/sturtevant/vunf9/ > > > > On Thursday, February 11, 2016 at 1:15:01 PM UTC-5, ajay jaiswal wrote: >> >> I am firing query to database and getting in json format . >> I want to send it to client (browser) using express js. >> but i am not getting the data in browser. >> >> app.post("/downloadImportedTable", function (req, res) { >> var connection = new sql.Connection(dbConfig, function (err) { >> >> var dbObject = req.body.tableName; >> if (err) { >> res.status(500).send(String(err)); >> } else { >> // Query >> var sqlrequest = new sql.Request(connection); >> sqlrequest.query('select * from ' + dbObject, function (err, >> recordset) { >> >> if (err) { >> res.status(500).send(String(err)); >> connection.close(); >> } else { >> //console.log(recordset);-----> it successfully fetch >> the data >> >> * res.set({ 'Content - Type': 'application/ms-excel; >> charset = UTF - 8' });* >> * res.status(200).send(recordset);* >> >> connection.close(); >> >> >> }; >> }); >> } >> }); >> }; >> >> >> The recored set contains millions of record so if i convert it using npm >> json2xls it makes busy the browser and server to converting json into xlsx >> .so this approach i don't want to use. >> > Even i convert it using "\t" and "\n". it blocks the other process . how to resolve it. i am dealing with large data set.
-- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/79f0601b-5a3a-4c34-9b1c-2a473760d22b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
