sam sam - 5 months ago 136
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.