Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces in tab names #173

Closed
Brad-eki opened this issue Apr 5, 2019 · 2 comments · Fixed by #210
Closed

Spaces in tab names #173

Brad-eki opened this issue Apr 5, 2019 · 2 comments · Fixed by #210

Comments

@Brad-eki
Copy link
Collaborator

Brad-eki commented Apr 5, 2019

Errors on processing a tab called 'Data Filters', Koala thinks it's called 'DataFilters'!C4.

When I use an underscore the problem goes away.

I might be able to get to the bottom of this, but I'll have to come back later...

Traceback (most recent call last):
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\koala\lib\site-packages\win32com\server\policy.py", line 278, in _Invoke_
    return self._invoke_(dispid, lcid, wFlags, args)
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\koala\lib\site-packages\win32com\server\policy.py", line 283, in _invoke_
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\koala\lib\site-packages\win32com\server\policy.py", line 586, in _invokeex_
    return func(*args)
  File "C:\Users\me\Documents\Python\xlwings\xlwings\server.py", line 198, in CallUDF
    res = call_udf(script, fname, args, this_workbook, FromVariant(caller))
  File "C:\Users\me\Documents\Python\xlwings\xlwings\udfs.py", line 311, in call_udf
    ret = func(*args)
  File "c:\users\me\documents\python\{OBSCURED}.py", line 107, in FILTERED
    generateModelGraph(filter_name)
  File "c:\users\me\documents\python\{OBSCURED}.py", line 33, in generateModelGraph
    athing = excel_compiler.gen_graph(inputs= inputs, outputs= [model.name.name])
  File "C:\Users\me\AppData\Local\Continuum\anaconda3\envs\koala\lib\site-packages\koala2-0.0.29-py3.7.egg\koala\ExcelCompiler.py", line 113, in gen_graph
    virtual_cell = Cell(i, None, value = self.cells[reference].value, formula = reference, is_range = False, is_named_range = True)
KeyError: "'DataFilters'!C4"
@danielsjf
Copy link
Collaborator

@Brad-eki, this pull request seems to solve your issue as described. Could you test it on your case?

@danielsjf
Copy link
Collaborator

I also added a test which passes now. If your problem is more specific, could you add an example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants