I'm sure somebody has rolled this up before, but I had cause to today.
Usage:
bitcoind listtransactions '*' 999999 | python json-to-csv.py > transactions.csv
Use favorite spreadsheet program to open transactions.csv
#!/usr/bin/python
import json
import sys
input = sys.stdin.read()
data = json.loads(input)
keys = []
for record in data:
for key in record:
if key not in keys:
keys.append(key)
cur = ""
output = ""
for key in keys:
output += '"' + key + '",'
output += '\n'
for record in data:
for key in keys:
if key in record:
if record[key].__class__ is int or record[key].__class__ is float:
output += str(record[key])
else:
output += '"' + record[key] + '"'
output += ','
output += '\n'
print output