create_named_range not working with worksheets containing a space in the name
Created originally on Bitbucket by jakelondon (Jackie London)
#!python
wb = openpyxl.Workbook()
ws1 = wb.create_sheet("Sheet With Space", 0)
ws2 = wb.create_sheet("SheetWithoutSpace", 0)
wb.create_named_range("MyNamedCell1", ws1, '$A$1')
wb.create_named_range("MyNamedCell2", ws2, '$A$1')
wb.save('test.xlsx')
This results in a workbook with 2 sheets. A1 on the 'SheetWithoutSpace' is named and A1 on 'Sheet With Space' is not