title: How to make my function find my excel table?
body: <p>I am trying to run through an excel file line by line and create a new list and then append every cell value on that line to the list. I don't think my code is correct but I just want to know why it cannot find the file, this is the error message.</p>
  
  <pre><code>def createPersonList(fileName):
     open(fileName)
      i = 0.0
  
      for line in fileName:
          i += 1
          Person = []
          for cell in line:
              Person.append(cell)
              return Person
  </code></pre>
  
  <p><strong>error message:</strong></p>
  
  <pre><code>  createPersonList(personData.csv) Traceback (most recent call last):
    File "&lt;ipython-input-36-207031458d64&gt;", line 1, in &lt;module&gt;
    createPersonList(personData.csv) NameError: name 'personData' is not defined
  </code></pre>