EPPlus icon indicating copy to clipboard operation
EPPlus copied to clipboard

Issue with INDEX formula when used with SUM

Open kulesshhh opened this issue 1 year ago • 1 comments

I am trying to use the SUM of a range by using INDEX method inside it. For e.g. =SUM(B2:INDEX(A2:C6, 5, 2)). This is working fine in excel sheet but giving error result through my code.

I was trying to understand the issue and it seems that INDEX just returns value of the cell in EPPLUS. However, It should return the cell reference when used in conjunction with the SUM or SUMIFs formula.

If you look at the Microsoft documentation for INDEX formula: "It can return value of the cell as well as reference of the specified cells" https://support.microsoft.com/en-us/office/index-function-a5dcf0dd-996d-40a4-a822-b56b061328bd#__reference_form

Looking forward for resolution or this issue

kulesshhh avatar Aug 04 '22 08:08 kulesshhh

Hi,

Assuming that this refers to the calculation capabilities of EPPlus.

We are aware of this and support for the INDEX function (and more functions) in addresses is under development and will be included in the next minor version (6.1).

swmal avatar Aug 05 '22 07:08 swmal

Just an update on this issue, this will be included in the next major version (EPPlus 7), which will have a rewritten calculation engine.

swmal avatar Jan 10 '23 14:01 swmal

Too bad, was hoping this would come sooner. Any workaround?

mlankamp avatar Apr 06 '23 15:04 mlankamp

Implemented in EPPlus 7

JanKallman avatar Feb 20 '24 14:02 JanKallman