Thank you, that makes much more sense. I really appreciate it! Also, in regards to the redirect..are you suggesting I may not want to do that for this application? Because I was intending on making that a confirmation page with the submitted information, I thought redirect would be the best for that?
On Friday, November 6, 2015 at 9:32:08 PM UTC-5, Anthony wrote: > > > def about(): >> import sys >> form = SQLFORM(db.excelform) >> from openpyxl import load_workbook >> wb = load_workbook(filename='filepath/excel.xlsx') >> sheet_ranges = wb['Sheet1'] >> sheet_ranges['C4'] = form.vars.last_name >> > > Close. Recall that you saved the submitted form data from the previous > request in session.vars -- so that's where you will find those values: > > sheet_ranges['C4'] = session.vars.last_name > > form = SQLFORM(db.excelform) is therefore unnecessary. With this line, > you are simply creating a fresh form object -- it doesn't know anything > about the form object you had created in the previous request to the > excelform function. Note that each request is independent of other > requests, with the models, controllers, and views executed in a new > environment. You save state from one request to the next via the session, > cache, files, or the database. > > Also, to be clear, when you call redirect(), that results in a new HTTP > request -- it sends a 303 response back to the browser, which instructs the > browser to make a new request to the redirect URL. > > Anthony > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

