However... given the context of the forum I expect that the questioner was not wanting an answer in BASIC... (still it's nice to know there's more than one way to skin a cat, as they say).
There is a way in OODoc but you need to add library with XPath.
Then it is fairly easy (eventually) to copy a sheet.
This is a cut from something I'm working on which keeps a blank form as the last sheet, and makes a copy before the blank to put new data into it. The 'populateSheet' proc is just my way of stuffing data into the new sheet, you can make up your own for whatever purpose you want.
regards.
@ jmgdoc,
Thanks for the improvements. They should help everyone to have more readable code.
Unfortunately my code was the result of several tries as I got to understand the package, so it did not end up verey elegant. I should try and use the top level functions as much as possible.