https://issues.apache.org/ooo/show_bug.cgi?id=122543
Bug ID: 122543
Issue Type: DEFECT
Summary: YEARFRAC does not calculate properly. Displays #NAME?
Product: App Dev
Version: AOO 3.4.1
Hardware: PC
OS: Windows 8
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: api
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Created attachment 80856
--> https://issues.apache.org/ooo/attachment.cgi?id=80856&action=edit
Screenshot
The YEARFRAC function will not display correctly. It displays #NAME? in the
field. If you press F2, space, enter, then it will calculate. If you save and
reload, it will calculate. Here is a test case:
#!/usr/bin/perl
testCase();
sub testCase {
use Win32::OLE;
$sm = Win32::OLE->GetActiveObject("com.sun.star.ServiceManager") ||
Win32::OLE->new("com.sun.star.ServiceManager") || die "CreateObject: $!";
$desktop = $sm->createInstance("com.sun.star.frame.Desktop");
$calc = $desktop->loadComponentfromUrl("private:factory/scalc", "_blank", 0,
[] );
$sheet = $calc->getSheets->getByIndex(0);
$sheet->getCellByPosition(0,0)->setFormula('=DATE(2014;01;01)');
$sheet->getCellByPosition(1,0)->setFormula('=1/YEARFRAC(A1;NOW())');
$sheet->getCellByPosition(2,0)->setFormula('=YEARFRAC(A1;NOW())');
}
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.