openpyxl workbook module not callable - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: openpyxl workbook module not callable (/thread-12206.html) |
openpyxl workbook module not callable - docwat - Aug-14-2018 Hi, I have pip installed openpyxl under Python 3.7 and cannot run this: >>>from openpyxl import workbook >>> >>>wb = workbook() Traceback : File "stdin", line 1, in <module. TypeError: 'module' object is not callable >>> Indeed no attributes appear to be functional.---> ws = wb.active --> ws.title =" A " warns ws does ont have title attribute I have pip uninstalled and re-installed many times but simply cannot get openpyxl to work. I have pip installed several other modules which work (such as Link Labs CONDUCTOR). PYTHON is entirely new to me. I can get xslwriter to wok fine but I need a clean wb.save of openpyyxl in order to put it in a multiple attempt loop to access a file which may be busy and wait until it is free. Clearly I am missing something with openpyxl install ! I would welcome any advice. Docwat RE: openpyxl workbook module not callable - buran - Aug-14-2018 try from openpyxl import Workbook wb = Workbook() RE: openpyxl workbook module not callable - docwat - Aug-14-2018 Thanks BURAN I had mostly seen the W but had missed the import Workbook always! Now no problem ! RE: openpyxl workbook module not callable - docwat - Aug-25-2018 Responding belatedly to buran Thanks buran. Yes I was looking for greater problems and missed my misstype ! Appologies Docwat |