Martin,
I think by doing some modifications in this code, you can achieve this. This example is for exporting dataset to word. So you can use it any controls binding dataset.
Check this link
http://www.eggheadcafe.com/community/aspnet/2/10125228/re.aspx--Raj