Cpan seems to have quite a few OpenOffice related Modules. I think the one you want to look at is OpenOffice::OOCBuilder "OOCBuilder is a Perl OO interface to create OpenOffice spreadsheets.". I have not used OpenOffice::OOCBuilder, but it seems well documented and has a couple of example scripts.