>From what I can tell, DAYS wasn't added until Excel 2013 [1]. Clearly
this means DAYS is not a recognized function in BIFF8. I developed a
solution [2] for saving unregistered functions in bug 58452, but this
gets tricky with common SS support regarding parsing, storing, and
evaluating and to have consistent behavior where it makes sense
between HSSF and XSSF workbooks.

A HSSFWorkbook would be unable to evaluate DAYS() without auxillary
VBA code, which we can't read or run from POI. The VBA function is
almost guaranteed to be implemented differently than the XSSF version
because of leap years, leap seconds, daylight savings, and
locality--which makes me think the user should be able to over-ride
this built-in.

Do we have a precedent for handling formulas that were never
recognized in BIFF8?

[1] 
http://www.techrepublic.com/blog/10-things/10-new-excel-2013-functions-that-can-save-you-time/
[2] 
https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java?r1=1711605&r2=1711604&pathrev=1711605

On Fri, Dec 4, 2015 at 1:10 AM, Javen O'Neal <javenon...@gmail.com> wrote:
> I got close to finding my answer in section 3.11.1 (starts on Page 74) of
> https://www.openoffice.org/sc/excelfileformat.pdf, but DAYS isn't included.
>
> Helpful resource if others are curious.
>
> On Fri, Dec 4, 2015 at 12:40 AM, Javen O'Neal <javenon...@gmail.com> wrote:
>> In FunctionEval.java [1], there's an array that maps the binary
>> function code used in BIFF8 to a
>> function instance.
>>
>> I'm implementing Days [2] for bug 58468 [3], and I have no idea what
>> the code is. Is there an easy way to figure out the code?
>>
>> Thanks!
>>
>> [1] 
>> https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?view=markup
>> [2] 
>> https://support.office.com/en-us/article/DAYS-function-57740535-D549-4395-8728-0F07BFF0B9DF#
>> [3] https://bz.apache.org/bugzilla/show_bug.cgi?id=58468

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to