1

I have installed xlrd successfully, however, on attempting to use a command of xlrd:

xlrd.open_workbook('datafile.xls')

I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'xlrd' is not defined

I cannot understand this error and how to rectify it.

Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
Varun Khanna
  • 85
  • 12
  • 1
    Possible duplicate of [NameError: name 'datetime' is not defined](https://stackoverflow.com/questions/19934248/nameerror-name-datetime-is-not-defined) – Aran-Fey Sep 21 '18 at 12:27

1 Answers1

0

Try

importing xlrd with:

from xlrd import *
Amber M
  • 17
  • 6