I\'m using mongodb 2.2.0 and am trying to print json in a single line as opposed to \"pretty\" printing using printjson() or find().pretty(). i.e.
printjson()
find().pretty()
With "sort" and "limit" , results can be customised. with mongoexport --type=csv , result can be printed into csv file, which can be read in xls or in one line.