#!/usr/bin/perl
# calc-example2 - Set Column sizes

use ooolib;

# Set variables
$doc = new ooolib("sxc");
$doc->oooSet("builddir", ".");
$doc->oooSet("title", "Calc Column Sizes");
$doc->oooSet("subject", "Calc Example");
$doc->oooSet("comments", "Sizes are set using cm");
$doc->oooSet("author", "ooolib Example");
$doc->oooSet("meta1-name", "Programmer");
$doc->oooSet("meta1-value", "Joseph Colton");

# Write the spreadsheet data
my($x, $y);
for($x=1;$x<=5;$x++) {
    $doc->oooSet("column-width", $x, $x);
    for($y=1;$y<=5;$y++) {
	$doc->oooSet("cell-loc", $x, $y);
	$doc->oooData("cell-float", $x*$y);
    }
}

my($filename) = $doc->oooGenerate("calc-example2.sxc");

exit;
