Re: Import Json web data source to xls or csv

2013-02-20 Thread pyplexed
Try something like: for d in data: if d["bid"] is not None and d["ask"] is not None: c.writerow([str(d["currency"]),str(d["symbol"]),str(d["bid"]),str(d["ask"]),str(d["currency_volume"])]) I've used 'is not None' in case 0 or 0.0 are acceptable bid or offer values. If you want to ex

Re: round off to two decimal & return float

2013-03-30 Thread pyplexed
Hi Sri. I'm not familiar with the xlwt module, but I think you are confusing two different things here. Generally spreadsheets separate out how they handle the value in a cell (the value) and how that value is displayed (the format). This means that the you leave the cell value unchanged when