OpenOffice-OODoc

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	Makefile.PL: Updated dependencies (updated INSTALL accordingly).
	Makefile.PL: utf8 becomes the default character set.
	File.pm: Archive::Zip 1.18 now required; IO::File required; file handles supported.
        Meta.pm: Added user-defined property access methods; added getTemplate(), unlinkTemplate().
        Text.pm: Added setNote(), fixed a bug in getTableByName() [#48356].
2.108	2009-05-24
	Some doc cleaning
	Meta.pm: added getUserProperty(), setUserProperty(), removeUserProperty()
	XPath.pm: added new check in constructor according to [#43744]
	XPath.pm: avoided a useless warning in getAttributes() [#42038]
	Text.pm: improved expandTable() according to [#41975] (thanks to
	Barry Slaymaker), changed getTable(), some code cleaning
	Image.pm: importImage() now can automatically import externally linked images
	File.pm: save() now checks the source files availability
2.107	2008-12-07
	Text.pm: added getCellPosition(), adapted from a proposal by dhoworth
	Makefile.PL: updated the XML::Twig version requirement
	Makefile.PL: (grrr...) removed the accent in the author's name, due to
	a Solaris-specific trouble with non-ASCII characters in the makefiles
	XPath.pm: now uses XML::Twig 3.32 instead of 3.22
2.106	2008-11-05

examples/text2table  view on Meta::CPAN


my ($input_file, $output_file, $lines, $columns) = @ARGV;

die "Usage : txt2table <input file> <output OOo file> <lines> <columns>\n"
	unless ($input_file && $output_file && $lines && $columns);

	# create the OOo spreadsheet
my $doc = odfDocument(file => $output_file, create => 'spreadsheet');

	# select & size the 1st (and only) sheet in the document
my $sheet = $doc->expandTable(0, $lines, $columns);
	# rename it as the input file (why not ?)
$doc->renameTable($sheet, $input_file);

	# populate the table
open INPUT, "<", $input_file or die "Input file $input_file unavailable\n";
my $line = undef;
my @rows = $doc->getTableRows($sheet);
for (my $i = 0 ; $i < $lines && ($line = <INPUT>) ; $i++)
	{
	my $row = $rows[$i];

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.562 second using v1.00-cache-2.02-grep-82fe00e-cpan-822dc35be37 )