Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Perl and OpenOffice::OODoc

Perl and OpenOffice::OODoc

Perl and OpenOffice::OODoc

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;

RE: Perl and OpenOffice::OODoc

I would create a CSV file and import it into Excel.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close