#!/usr/bin/perl use strict; use OpenOffice::OODoc; use Data::Dump 'pp'; my $doc = odfDocument(file => "myspreadsheet.ods"); open (my $out, '>', "outfile.txt") or die $!; foreach my $sheetno (0...$doc->getTableList-1){ my $table = $doc->getTable($sheetno,'normalize'); my ($rows,$cols) = $doc->getTableSize($table); my @text = $doc->getTableText($table); #pp @text; print "Sheet=$sheetno rows=$rows cols=$cols\n"; foreach my $rowno (0...$rows-1){ foreach my $colno (0...$cols-1){ my $value = $text[$rowno][$colno]; next if $value eq ''; print $out $value,"\n" } print $out "\n"; } };