for download all tables at once
try:
    import StringIO
except ImportError:
    from io import StringIO

def download_csv():
     stream = StringIO.StringIO()
     db.export_to_csv_file(stream, 
                                delimiter = ',', 
                                quotechar = '"', 
                                write_colnames = True, 
                                represent = False)
     response.headers['Content-Type'] = 'text/csv'
     response.headers['Content-Disposition'] = 'inline; filename="{0}.csv"'.
format(request.function.replace('_', ' ').title() )
     return stream.getvalue()

modified the code before db.export_to_csv_file() to rows select to download 
one table at a time

best regards,
stifan

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ef218ee3-8954-4981-9135-2ba19818be58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to