is it possible to get referenced table format representation during export 
to excel using xlwt?
*e.g.*
for table in db.tables:
ws = wb.add_sheet(table, cell_overwrite_ok = True)

for y, field in enumerate(db[table].fields):
ws.write(0, y, field)

x = 1
rows = db(db[table].id > 0).select()
for row in rows:
*#if db[table][field].type == 'reference': # no error occured but the 
result is not expected, reference table has shown an id instead of record 
representation*
* if 'reference' in db[table][field].type:*
* ws.write(x, y, db[table]._format)*
else:
ws.write(x, y, row[field] )

x = x + 1

i've tried before and got error traceback :
*Exception: Unexpected data type <type 'function'>*

any idea how to face it using web2py way?

thanks and 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to