[web2py] Re: read an excel file stored in session using xlrd

2014-11-20 Thread T.R.Rajkumar
Yes, Anthony I'll do as you said. Thanks once again. On Tuesday, November 18, 2014 12:06:31 PM UTC+5:30, T.R.Rajkumar wrote: > > form_upload = SQLFORM.factory(Field('your_excel_file', 'upload', > uploadfolder='helloworld/uploads')) > if form_upload.process().accepted: > session.your_excel_

[web2py] Re: read an excel file stored in session using xlrd

2014-11-19 Thread Anthony
It sounds like you do need the file to persist across multiple requests, so the simplest approach might be to create a database table with an upload field to store the file. As soon as you're done with the file, then just delete the record in the database (the file will be deleted automatically

[web2py] Re: read an excel file stored in session using xlrd

2014-11-18 Thread T.R.Rajkumar
@Anthony Thanks for your kind reply. I don't need to save the file. That's why w/o db, session becomes handy. I upload the file in master data page having two forms. One form is the SQLFORM.factory for uploading the excel file and the other form is to enter the key parameters. When the second f

[web2py] Re: read an excel file stored in session using xlrd

2014-11-18 Thread Anthony
First, upload fields do not store the full file path, only the filename itself. The file path is obtained from the Field object, which you are not persisting in this case because you are using SQLFORM.factory. Also, uploads with SQLFORM.factory are tricky because the filename includes the datab