Skip to content

cannot open workbook by file name.  #804

@doraemon1293

Description

@doraemon1293

My code:

import xlwings as xw

app = xw.App()
fn = r"abc.xlsx"
dataWb = app.books.open(fn)

Error

Traceback (most recent call last):
  File "C:\project\learnXlwings\t.py", line 7, in <module>
    dataWb = app.books.open(fn)
  File "C:\Python35\lib\site-packages\xlwings-dev-py3.5.egg\xlwings\main.py", line 2746, in open
    throw = not os.path.samefile(impl.fullname, fullname)
  File "C:\Python35\lib\site-packages\xlwings-dev-py3.5.egg\xlwings\_xlwindows.py", line 488, in fullname
    return self.xl.FullName
AttributeError: 'NoneType' object has no attribute 'FullName'

In _xlwindows.py Class Book

    @property
    def fullname(self):
        return self.xl.FullName

self.xl equals to None

Python 3.5
win7-64
xlwings 0.11.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions