Hi Wilson,
I guess some transformations could be useful:
http://help.sap.com/saphelp_nw04/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm
For the export part, that's just a regular gui_download method call.
There are plenty of demos out there Image may be NSFW.
Clik here to view.
Br,
Manu.