Skip to Content
0
Former Member
Jun 10, 2004 at 10:08 AM

Export to excel

420 Views

Hi

i want to export some page to an excel file. I've manage to do this with :

call method runtime->server->response->get_data

receiving data = wxstring.

runtime->server->response->set_data( wxstring ).

runtime->server->response->set_header_field( name = 'Contnet-Type'

value = 'application/vnd.ms-excel' ).

runtime->server->response->set_header_field(

name = 'content-disposition'

value = 'attachment; filename=xloutput.xls' ).

content_length = xstrlen( wxstring ) .

runtime->server->response->set_header_field( name = 'Content-Length'

value = content_length ).

runtime->server->response->set_header_field( name = 'cache-control'

value = 'max-age=0' ).

Its works, but when i open the excel file, it tells me that files are missing (css files only). I know in my page, i use htmlb object and doesn't contains only a table but some pics or other things.

My question is how can i make an excel file with only my table (an internal table) ? Does i have to open a new page and write only the table in it ? How can i do this ?

Thanks