Help with file formats xlsio

Hello

I have a problem with xlsIO 18.4.0.46

I have on excel file with macro that does the following

Public Function test ()
     test = CStr (Now)
End Function

This piece of code only returns the date and time, but
what I need is to get the value from my code in c #,

What I need is to get the value of the macro function.
I can get values of formulas directly from the cells, but not when calling them from a macro.

I already tried various methods like these
...

sheet.EnableSheetCalculations();

application.EnablePartialTrustCode = true;
 sheet.Calculate ();

// In excel file RESULTNAME is Named cell that calls macro function like:

=test()

var resultx = workbook.Names ["RESULTNAME"]. RefersToRange.DisplayText;

I cannot get the updated value, only get the saved date in the cell...

I hope I was clear

Thanks in advance!


Attachment: case_26a33d07.rar

3 Replies 1 reply marked as answer

SK Shamini Kiruba Sobers Syncfusion Team March 8, 2021 12:46 PM UTC

Hi jose, 

Sorry, XlsIO cannot run macros. So, we cannot get the calculated value for the macro function. We have only support for creating and editing macros. 

Please let us know if you have any other queries. 

Regards, 
Shamini 


Marked as answer

JL jose luis barajas March 14, 2021 12:07 AM UTC

Thanks!


SK Shamini Kiruba Sobers Syncfusion Team March 15, 2021 05:01 AM UTC

You 're welcome.

Loader.
Up arrow icon