Thanks Bruno.
I got it working. But now the problem I am facing is - It is not writing the header properly. Though I do a getOverContent and getUnderContent and then add tables but somehow the header is not being written. Any suggestions there?
My code looks like -
Regards,
Tina