Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.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
Outlook中的Perl Excel预览问题_Perl_Excel_Spreadsheet - Fatal编程技术网

Outlook中的Perl Excel预览问题

Outlook中的Perl Excel预览问题,perl,excel,spreadsheet,Perl,Excel,Spreadsheet,我正在用Perl生成Excel报告 我在单元格中使用了公式,它工作正常,但在Outlook中,当我查看预览文件时,单元格显示的是类似于电子表格::WriteExcel::Format=HASH(0x87d6d04)的内容,而不是total 我只使用简单的公式,比如=sum(B1:B10)或=sum(A1,B2) 如何解决这个问题 outlook excel预览您可能需要使用write\u公式方法,而不是普通的write方法 比如说, $worksheet->write_formula(1

我正在用Perl生成Excel报告

我在单元格中使用了公式,它工作正常,但在Outlook中,当我查看预览文件时,单元格显示的是类似于
电子表格::WriteExcel::Format=HASH(0x87d6d04)
的内容,而不是total

我只使用简单的公式,比如
=sum(B1:B10)
=sum(A1,B2)

如何解决这个问题


outlook excel预览

您可能需要使用
write\u公式
方法,而不是普通的write方法

比如说,

$worksheet->write_formula(1, 0, '=SIN(B1:B10)');
从代码中关于CPAN for

的文档中:

$worksheet->write(..., $format05,$font );
在方法调用的末尾有一个不必要的尾随
$font
,该方法调用被传递给
write\u formula()
(通过
write()
)作为公式的可选结果


这就是Outlook中显示的公式结果。

您能给我们看看您编写的Perl代码吗?在那里打印hashref而不是其内容。$worksheet->write($excel\u serial\u no,4,“=SUM(F${SUM\u excel\u serial\u no\u 2},G${SUM\u excel\u serial\u no\u 2})”,$format05,$font);给出一些建议,若您使用write()或write_formula(),问题尚未解决编辑并不重要。问题是在方法调用的末尾有一个名为$font的额外格式对象。您需要删除包含单元格边框/和少量设计内容的。然后,该信息应为$format05格式。不能在这样的写入方法中指定2种格式。formulaMTD中的未知定义名称MTD不是电子表格::WriteExcel文档中列出的受支持函数之一。