From 6ff8a464810a41c210958816741a9ff72a136748 Mon Sep 17 00:00:00 2001 From: Joel Nothman Date: Sun, 9 Apr 2017 17:41:29 +1000 Subject: [PATCH] Fix loose character; sorry --- pandas/formats/excel.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pandas/formats/excel.py b/pandas/formats/excel.py index c8e51415cb8e3..4499540b763ad 100644 --- a/pandas/formats/excel.py +++ b/pandas/formats/excel.py @@ -95,6 +95,7 @@ def build_xlstyle(self, props): 'fill': self.build_fill(props), 'font': self.build_font(props), } + # TODO: support number format # TODO: handle cell width and height: needs support in pandas.io.excel def remove_none(d): @@ -207,6 +208,16 @@ def build_font(self, props): assert size.endswith('pt') size = float(size[:-2]) + # TODO: + # re.search(r'''(?x) + # ( + # "(?:[^"]|\\")+" + # | + # '(?:[^']|\\')+' + # | + # [^'"]+ + # )(?=,|\s*$) + # ''') font_names = [name.strip() for name in props.get('font-family', '').split(',') if name.strip()] @@ -237,7 +248,7 @@ def build_font(self, props): 'italic': self.ITALIC_MAP.get(props.get('font-style')), 'underline': ('single' if decoration is not None and - 'underline' in decoration` + 'underline' in decoration else None), 'strike': (None if decoration is None else 'line-through' in decoration),