Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl and OpenOffice::OODoc

Status
Not open for further replies.

rbri

Programmer
Jun 27, 2002
84
0
0
US
Hello
I need some help. I requested to give my manager a list of all Linux users that have sudo access in our environment. I generated a text file for him containing 2 columns one column with the group name and the other column with the user in that group I set up a cron to run the script a couple of time a year to satisfy audit requirements and email the text file to him and other managers. My manager doesn't want a text file but, wants the output given to him as a spreadsheet. I found a Perl module named OpenOffice::OODoc and from reading the documentation sound like it should be able to do my task. I have figured out how to create the .ods file with the below code. I have ran into a few issues 1) when I open the created .ods files I get an error saying its corrupt but, openoffice does repair and open it and I can manually insert my text file but, I need the perl script to created and insert my text file. Does anyone know how to insert a text file into my newly created .ods file and not get the corrupt message? Any help will be greatly appreciated. Thanks Randy
##
use warnings;
use strict;
use OpenOffice::OODoc;
##
my ( $sDoc );

$sDoc = odfDocument(
file => "TestSpdSht.ods",
create => 'spreadsheet',
);

$sDoc -> save;
##
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top