title: Use django-import-export with class based views
body: <p>I want to use <code>django-import-export</code> with class based views.</p>
  
  <p>In the docs at <a href="https://django-import-export.readthedocs.org/en/latest/getting_started.html" rel="nofollow">https://django-import-export.readthedocs.org/en/latest/getting_started.html</a> I see an example of exporting as csv</p>
  
  <pre><code>&gt;&gt;&gt; dataset = BookResource().export()
  &gt;&gt;&gt; print dataset.csv
  id,name,author,author_email,imported,published,price,categories
  2,Some book,1,,0,2012-12-05,8.85,1
  </code></pre>
  
  <p>but which class based view should I use if I want to return an Excel file? Just <code>View</code>?</p>