sam sam - 10 months ago 246
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?


I think you want:

from openpyxl import workbook # not Workbook

Note the capitalization of the name here.