sam sam - 1 year ago 548
Python Question

cannot import workbook in openpyxl

I have installed openpyxl in ubuntu.

now I am running the openpyxl with xlsx files.

While importing the module, it gives me the following error.

from openpyxl import Workbook
ImportError: cannot import name Workbook

Can anyone knows what I have to do to solve the problem?

Answer Source

I think you want:

from openpyxl import workbook # not Workbook

Note the capitalization of the name here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download