From d6c9730882a6af36aeab162216671826074e6311 Mon Sep 17 00:00:00 2001 From: Irfan Date: Thu, 9 Feb 2017 16:21:02 +0500 Subject: [PATCH] Enable Guess types to format cells in excel --- report_builder/mixins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/report_builder/mixins.py b/report_builder/mixins.py index 711ad092..2dcdb87a 100644 --- a/report_builder/mixins.py +++ b/report_builder/mixins.py @@ -109,6 +109,7 @@ def build_csv_response(self, wb, title="report"): def list_to_workbook(self, data, title='report', header=None, widths=None): """ Create just a openpxl workbook from a list of data """ wb = Workbook() + wb.guess_types = True title = re.sub(r'\W+', '', title)[:30] if isinstance(data, dict):