Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Perl 在Openoffice中以编程方式合并单元格_Perl_Openoffice.org_Openoffice Calc - Fatal编程技术网

Perl 在Openoffice中以编程方式合并单元格

Perl 在Openoffice中以编程方式合并单元格,perl,openoffice.org,openoffice-calc,Perl,Openoffice.org,Openoffice Calc,我想编写一个脚本,它应该生成一个OpenOffice计算表。 我已经下载了Debian的“libooolib perl”包,它运行良好,但我有一个问题: 我不能集中细胞。我希望标题是这样的: This is the Head-Line of the Document | This is subheadline 1 | This is subheadline 2 | This is subheadline 3 | This is co

我想编写一个脚本,它应该生成一个OpenOffice计算表。 我已经下载了Debian的“libooolib perl”包,它运行良好,但我有一个问题: 我不能集中细胞。我希望标题是这样的:

This is the Head-Line of the Document | This is subheadline 1 | This is subheadline 2 | This is subheadline 3 | This is content 1 | This is content 2 | This is content 3 | This is content 4 | This is content 5 | This is content 6 | 这是文档的标题行| 这是分标题1 |这是分标题2 |这是分标题3| 这是内容1 |这是内容2 |这是内容3| 这是内容4 |这是内容5 |这是内容6|
如您所见,第一行包含3个单元格。据我所知,我无法使用csv或其他非二进制格式对此进行存档,因此我需要一个适当的库,它可以集中单元格。

链接的perl模块似乎不支持合并单元格

OpenOffice文档格式的文档可能有助于:


它包含代码示例,尽管是python中的,也许您可以利用这些知识在libooolib perl中实现缺少的函数

use OpenOffice::OODoc;
my $document = odfDocument(file=>'filename.odt',create=> 'text');
my $table=$document->appendTable("Table", 4, 3);
$document->cellSpan($table,"A1",3);
$document->cellValue($table, "A1", "This is the Head-Line of the Document");
#(...)
$document->save;
居中(一种特殊形式的文本对齐和/或对齐);我想你这里指的是
合并单元格
(a.o.p.
拆分单元格