You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "tucker-adkison (via GitHub)" <gi...@apache.org> on 2026/04/15 17:02:48 UTC

[PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

tucker-adkison opened a new pull request, #1046:
URL: https://github.com/apache/poi/pull/1046

   ## Summary
   When converting from Google Sheets to Excel, Google Sheets puts the placeholder formula ` __xludf.DUMMYFUNCTION` to maintain backwards compatibility with Excel. The value appears as `=IFERROR(@__xludf.DUMMYFUNCTION("..."), value)`, with value being the cached value from Google Sheets
   
   This PR handles this issue by keeping the cached value instead of throwing a `NotImplementedException`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4254132297

   Any docs to back up that this is a standard that we should support? And is there a reason to recalc? Poi will never have good support for edge case functions and the XML files in xlsx have cached eval results that poi uses.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4254893797

   -1 from me without proper docs.
   And you can use POI's methods to register your own workaround with us adding anything to POI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "tucker-adkison (via GitHub)" <gi...@apache.org>.
tucker-adkison commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4256281690

   > -1 from me without proper docs. And you can use POI's methods to register your own workaround without us adding anything to POI.
   
   I could not find a formal spec that names __xludf.DUMMYFUNCTION itself. What I did find is formal OOXML documentation that formula cells may store a cached last-calculated result in <v>, and POI already documents using cached formula results when evaluation cannot be completed. The justification here is not to add this Google function, but more to keep the cache value when recalculation is unable to evaluate the cell
   
   OOXML spec: https://learn.microsoft.com/en-us/office/open-xml/spreadsheet/working-with-formulas
   POI Documentation: https://poi.apache.org/components/spreadsheet/eval.html
   Microsoft Q&A: https://learn.microsoft.com/en-us/answers/questions/4986422/xludf-dummy-funtion


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "tucker-adkison (via GitHub)" <gi...@apache.org>.
tucker-adkison commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4254843558

   > Any docs to back up that this is a standard that we should support? And is there a reason to recalc? Poi will never have good support for edge case functions and the XML files in xlsx have cached eval results that poi uses.
   
   To clarify, this change is not trying to evaluate __xludf.DUMMYFUNCTION in POI.
   
   Google Sheets can emit formulas like __xludf.DUMMYFUNCTION(...) for functions Excel does not support, but it also stores the computed cached value in the XLSX. My change uses that cached value rather than failing on the unsupported formula itself.
   
   So the benefit here is better interoperability with Google Sheets-generated XLSX files, without requiring POI to implement evaluation for those functions because those functions are not supported by Excel’s formula engine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4254207010

   Poi let's you register your own functions. Google will find links for you. One is https://poi.apache.org/components/spreadsheet/user-defined-functions.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4256312684

   and why won't you answer why you can't just add the function using POI's API to add UDFs?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Use cached value for __xludf.DUMMYFUNCTION when recalculating cell [poi]

Posted by "tucker-adkison (via GitHub)" <gi...@apache.org>.
tucker-adkison commented on PR #1046:
URL: https://github.com/apache/poi/pull/1046#issuecomment-4256358706

   > and why won't you answer why you can't just add the function using POI's API to add UDFs?
   
   I already implemented this as a UDF registration internally in our codebase, exactly as you're suggesting, and it's working as expected. The reason I put up this PR is so other POI users who hit this issue don't have to independently discover and implement the same workaround, when the fix is a single function that always returns an error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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