Check out the OpenOffice::OODoc module on CPAN:
<https://metacpan.org/pod/OpenOffice::OODoc::Intro>

The documentation is a little sparse, especially with regard to “spreadsheet” 
mode, and I don’t have Libre Office on my system to test it out, but the 
following code produces an ods file that can be opened by Microsoft Excel with 
the expected content on my Mac Pro running perl version 5.34.3:

#!/opt/local/bin/perl
use strict;
use warnings;

use OpenOffice::OODoc;

my $spreadsheet = odfDocument(
        file => "spreadsheet.ods",
        create => "spreadsheet",
);

$spreadsheet->appendTable("MyTable",6,4);
$spreadsheet->cellValue("MyTable",2,1,"New value");
$spreadsheet->save();



> On Jan 28, 2024, at 8:08 AM, hw <h...@adminart.net> wrote:
> 
> On Thu, 2024-01-25 at 20:28 -0600, Mike wrote:
>> It can be done with a Perl module:
>> https://unix.stackexchange.com/questions/723650/editing-libreoffice-calc-spreadsheets-in-the-terminal
>> 
>> I have not tested that.
> 
> I do not want to edit spreadsheets in a terminal.  There's some other
> software for that.
> 
> I'm looking for something similar to Excel::Writer::XLSX, mainly to
> automatically export database tables to spreadsheets from perl
> programs in ods format rather than in xlsx format.
> 
> 
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
> 
> 

Jim Gibson
j...@gibson.org




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to