[Django]-How to export to excel datetime in Django 1.7

2👍

Your problem is apparently due to aware and naive datetimes.

You have to make you datetime objects aware. You can install pytz for this:

pip install pytz

And then make your datetime objects aware :

import pytz

(pytz.utc.localize(datetime.datetime), xlwt.easyxf(num_format_str='DD/MM/YYYY HH:MM:SS')),

Hope this helps.

1👍

You can use xlsxwriter for this
https://pypi.python.org/pypi/XlsxWriter

Leave a comment