#!/usr/bin/perl # example5 - Creates a sxw Writer document use ooolib; # Set variables $doc = new ooolib("sxw"); # Type of document (ie. sxc) $doc->oooSet("builddir", "."); # Directory to create document in $doc->oooSet("title", "Title - Example 5"); # Title of document $doc->oooSet("subject", "Subject - Example 5"); # Subject of document $doc->oooSet("comments", "Who needs comments?"); # Comments for document $doc->oooSet("keyword", "keyword1"); # Add a keyword for the document $doc->oooSet("keyword", "keyword2"); # Add a keyword for the document $doc->oooSet("author", "John Doe"); # Set the author of the document $doc->oooData("default", "This is some simple text"); $doc->oooData("default"); # A blank line $doc->oooData("default", "Special Characters: "); $doc->oooData("default", "\t!\"#\$%\&'()`{}[];:+*\\_,.<>?|"); $filename = $doc->oooGenerate("example5.sxw"); # Create the document print "$filename\n"; exit;