开发者

Perl Excel preview problem in Outlook

开发者 https://www.devze.com 2023-02-20 07:40 出处:网络
I am generating Excelreport in Perl. I am usi开发者_StackOverflowng the Formula in the cell, it\'s working fine, but in Outlook when I see through preview file, the cell is showing something like Spr

I am generating Excel report in Perl.

I am usi开发者_StackOverflowng the Formula in the cell, it's working fine, but in Outlook when I see through preview file, the cell is showing something like Spreadsheet::WriteExcel::Format=HASH(0x87d6d04) instead of total.

I am using simple forumulas only, like =sum(B1:B10) or =sum(A1,B2).

How to fix this?

Perl Excel preview problem in Outlook

outlook excel preview


You probably need to use the write_formula method rather than the plain write one.

For example,

$worksheet->write_formula(1, 0, '=SIN(B1:B10)');

From the documentation on CPAN for Spreadsheet::WriteExcel


In your code:

$worksheet->write(..., $format05,$font );

You have an unnecessary trailing $fontat the end of that method call which is being passed to write_formula() (via write()) as an optional result for the formula.

That is what is showing up as the formula result in Outlook.

0

精彩评论

暂无评论...
验证码 换一张
取 消