Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Get cell coordinates of a custom formula (Read 383 times)
Ale
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 14
Joined: May 26th, 2023
Get cell coordinates of a custom formula
May 27th, 2023 at 7:49am
Print Post  
Hello,

in this code (custom formula):

Code
Select All
public class CustomFunctions : IExpressionEvaluator {
        int a = 0;

        public object EvaluateIdentifier(IExpressionEvaluatorContext context, string identifier) {
            return null;
        }

public object InvokeFunction(IExpressionEvaluatorContext context, string name, IList parameters) {
            if(name == "FUNC_A") {

                // HERE: get cell row and column where this formula is running

           }

// BLA BLA BLA .... CODE 



How can I get row and column where this formula (FUNC_A) is running?

Thank you!
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Get cell coordinates of a custom formula
Reply #1 - May 29th, 2023 at 7:24am
Print Post  
Hi,

This build adds CurrentColumn and CurrentRow properties to the context object -
https://mindfusion.eu/_beta/spreadwin_eval.zip

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Ale
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 14
Joined: May 26th, 2023
Re: Get cell coordinates of a custom formula
Reply #2 - May 29th, 2023 at 9:00am
Print Post  
Wow thank you! In fact I found those two properties only at runtime but did not exist in design time.
That is what I needed, thanks a lot!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint