#!/usr/bin/env perl
use warnings;
use strict;
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( 'perl.xlsx' );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_formula( 'A1', '=SUM(1, 2, 3, 4)' );
$workbook->close();
到目前为止,这在 LibreOffice 上运行良好。但是今天这不再起作用(中的值A1
是0
) - 可能是由于一些 LibreOffice 更新(LibreOffice 3.5 Build-ID: 350m1(Build:402))。
Excel::Writer::XLSXoccasionally
文档的以下部分是否涉及此类情况?
If required, it is also possible to specify the calculated value of the formula. This is occasionally necessary when working with non-Excel applications that don't calculate the value of the formula. The calculated $value is added at the end of the argument list