On 04/28/2012 09:32 AM, rahulserver wrote:
I wish to read an excel sheet in web2py.I tried few samples from
python codes which use the xlrd object.However in web2py, when I
import the xlrd object, I get the following error:
<type 'exceptions.ImportError'> No module named xlrd
So why is it like that? And is there any way to read an excel file
without converting it to a csv file?
That just means you didn't install or import the module correctly. Both
are easy.
Place the xlrd folder hierarchy in the modules folder of your app.
Then import it with:
xlrd = local_import('xlrd')
Then use with something like
wb = xlrd.open_workbook('some-file-name')
--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418