Skip to content

Commit 0a1ff1b

Browse files
author
amirniakan
committed
Fix - fix special column name - wrap col names
1 parent 02a3d34 commit 0a1ff1b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyxlsb2/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from .workbook import Workbook
44
from .xlsbpackage import XlsbPackage
55

6-
__version__ = '0.0.8'
6+
__version__ = '0.0.9'
77

88

99
def open_workbook(name, *args, **kwargs):

pyxlsb2/ptgs.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,9 @@ def stringify(self, tokens, workbook):
635635
address = None
636636
if supporting_link.brt in rt._SUP_LINK_TYPES:
637637
if first_sheet_idx == last_sheet_idx and first_sheet_idx >= 0:
638-
address = workbook.sheets[first_sheet_idx].name + '!' + cell_add
638+
address = "'{}'!{}".format(workbook.sheets[first_sheet_idx].name, cell_add)
639639
elif first_sheet_idx == last_sheet_idx and first_sheet_idx == -1:
640-
address = workbook.sheets[last_sheet_idx].name + '!' + cell_add
640+
address = "'{}'!{}".format(workbook.sheets[last_sheet_idx].name, cell_add)
641641
elif first_sheet_idx == last_sheet_idx and first_sheet_idx == -2:
642642
address = cell_add
643643

@@ -704,7 +704,7 @@ def stringify(self, tokens, workbook):
704704
address = None
705705
if supporting_link.brt in rt._SUP_LINK_TYPES:
706706
if first_sheet_idx == last_sheet_idx and first_sheet_idx >= 0:
707-
address = workbook.sheets[first_sheet_idx].name + '!' + first + ':' + last
707+
address = "'{}'!{}".format(workbook.sheets[first_sheet_idx].name , first + ':' + last)
708708

709709
if address is None:
710710
print("AreaPtg External Address Not Supported {0}:{1} {2} {3}".format(cell_add_first, cell_add_last, first_sheet_idx, last_sheet_idx))

0 commit comments

Comments
 (0)