# XlXtrFun error when Excel is opened



## Tronen

Hello:

I'd been using this addin called XlXtrFun for years. It is very useful mainly for interpolate (splines, etc..). Now the problem comes because I suspect this addin doesn't work for 64 bit Excel versions.

When we are trying to load the addin it appears a message when Excel is opened: "The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?" If Yes is selected then Excel closes. If No is select the addin is not loaded.

We web site for the adding is this:

http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm

I have tried to contact with support@xlxtrfun.com but this address doesn't work because the web site is a little bit old.

I think it could be possible to make this addin work for a 64 bit Excel. In this sense I have found this site

http://www.dllfoot.com/fixing/xlxtrfun.xll.html

 but I don't understand what they try to explain and it is needed to used a suspicious program called DLLEscort_Setup.exe and a process a little bit dark...

Any other ideas would be welcome.


----------



## ZVI

Hi,

The recommendation of the 2nd link has no sense in this case.
 That tool is XLL (actually - DLL) AddIn compiled for the Excel 32 bit only.
 Theoretically the owner of its C++ source code might recompile the code for the 64 bit version too, but looks like the AddIn is not supported anymore.

What can you do:
1. Install one more Excel 32 bit of another version (say 2010 32bit if you are using 2016 64bit) and use it for the tasks of that AddIn.
 2. Try to find alternative VBA code which is good by default for both 32 and 64 bits. 
Or even hire someone (the Author?) for developing VBA AddIn with the similar functionality in case it’s too critical.

Regards,


----------



## ZVI

As to the alternative - test the XonGrid Interpolation Add-in which is free and has versions for 32 and 64 bit of Excel.


----------



## Tronen

ZVI said:


> As to the alternative - test the XonGrid Interpolation Add-in which is free and has versions for 32 and 64 bit of Excel.



Dear Vladimir Zakharov, *thank you very much for your help*.

I have tried to install XonGrid. Apparently, the INSTALL-Xll.xls works well but any time I try to open Excel again I receive a message that looks like the other one with XlXtrFun:

"The file format and extension of "XonGrid-w64.xll" don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?

If I say "yes", then the file is opened in text mode with strange symbols (like a compiled file) and there is not any XonGrid 4 interpolation category in fx button. If I say "no" the complement is not loaded.

Provided there is the code I would try to understand what is happening, or better I would try to contact with Author. That seems a much easier option.

Thank you very much again.


----------



## cenk1972

Dear Tronen,
I have the very same problem. I've been using this xlxtrfun for years and i have formulations based on it in many files and i have big problems after switching to excel 2016 64b (while it works well in the office with excel 2016 32b). It would help a lot if you can post here when you find a solution after contacting the author.
Best regards


----------



## Erwin1966

Has there been found a solution to make xlxtrfun work on 64 bit?


----------



## PS_Batam

I have same problem and would like to ask for any updates.
Cheers


----------



## Fluff

xlxtrfun does not work with 64 bit versions of Excel & that is unlikely to change.


----------



## ZVI

Hi,

Actually, access to the 32-bit XtrFun.dll from the 64-bit version of Excel is possible.
My testing of the only Interp() function was successful.
Two files were created for that: XtrFun64.exe (IPC - interprocess communicator) and prototype of the Excel AddIn XtrFun64.xlam

List of used files:
XtrFun.dll - from the original source
XtrFun64.xlam - VBA AddIn (testing prototype) instead of the XlXtrFun.xll
XtrFun64.exe - IPC

Self-registration of IPC requires XtrFun64.exe to be run as administrator only once.
Both 32 and 64 bit of Excel is supported without any changes.

In theory, the following functions from XtrFun.dll can be supported in Excel 64 bit:
ddydx
dydx
IndexOfClosestValue
Interp
Interp3D
InterpMatrix
Interpolate
Intersect
LookupClosestValue
LookupClosestValue2D
Pfit
Spline
Triangles
XatY

Not sure if anyone interested in this way (let me know),
and if I’ll be such a hero to implement all of that in the nearest future.


----------



## felipeavf

ZVI said:


> Hi,
> 
> Actually, access to the 32-bit XtrFun.dll from the 64-bit version of Excel is possible.
> My testing of the only Interp() function was successful.
> Two files were created for that: XtrFun64.exe (IPC - interprocess communicator) and prototype of the Excel AddIn XtrFun64.xlam
> 
> List of used files:
> XtrFun.dll - from the original source
> XtrFun64.xlam - VBA AddIn (testing prototype) instead of the XlXtrFun.xll
> XtrFun64.exe - IPC
> 
> Self-registration of IPC requires XtrFun64.exe to be run as administrator only once.
> Both 32 and 64 bit of Excel is supported without any changes.
> 
> In theory, the following functions from XtrFun.dll can be supported in Excel 64 bit:
> ddydx
> dydx
> IndexOfClosestValue
> Interp
> Interp3D
> InterpMatrix
> Interpolate
> Intersect
> LookupClosestValue
> LookupClosestValue2D
> Pfit
> Spline
> Triangles
> XatY
> 
> Not sure if anyone interested in this way (let me know),
> and if I’ll be such a hero to implement all of that in the nearest future.



Hi @vladimir,

When you said:


> Two files were created for that: XtrFun64.exe (IPC - interprocess communicator) and prototype of the Excel AddIn XtrFun64.xlam


How do I suppose can create these files?

Thank you.
Felipe.


----------



## Tronen

Hello:

I'd been using this addin called XlXtrFun for years. It is very useful mainly for interpolate (splines, etc..). Now the problem comes because I suspect this addin doesn't work for 64 bit Excel versions.

When we are trying to load the addin it appears a message when Excel is opened: "The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?" If Yes is selected then Excel closes. If No is select the addin is not loaded.

We web site for the adding is this:

http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm

I have tried to contact with support@xlxtrfun.com but this address doesn't work because the web site is a little bit old.

I think it could be possible to make this addin work for a 64 bit Excel. In this sense I have found this site

http://www.dllfoot.com/fixing/xlxtrfun.xll.html

 but I don't understand what they try to explain and it is needed to used a suspicious program called DLLEscort_Setup.exe and a process a little bit dark...

Any other ideas would be welcome.


----------



## ZVI

felipeavf said:


> Hi @vladimir,
> 
> When you said:
> 
> How do I suppose can create these files?
> 
> Thank you.
> Felipe.


Hi Felipe,

Those files were created to test the communication between DLL 32 bit and Excel 64 bit.
Only Interp() function from XtrFun.dll was implemented in those files for testing.
Please wait a few days, I will add and test more functions and provide a link to download all the required files.

Unfortunately, the 32 bit XLL (XlXtrFun.xll,  size = 109056 Bytes) is slightly inconsistent with the description in the HLP.
And functionality of the DLL (XtrFun.dll) is not exactly the same as the one provided by XLL.
Hope it is not critical, since it mainly concerns optional arguments.

Developing an XLAM add-in from scratch with similar functionality would be easier way, but 32 <-> 64 bit bridge is more interesting to me.

Regards


----------



## felipeavf

Hi @ZVI ..
Thanks for your interest on solve this problem. I'm particularly interested on solve this problem no matter how.
For sure you will be like a hero if you either write down a new 64-bit code for this or bridge it.

Regarding bridge, it won't make the process calculation slightly slower than a new 64-bit code dedicated to that?
I also presume this bridge could be used for any other add-in that only runs in 32-bit mode, or it's dedicated to the XlXtrFun.xll only?

I'm just concern because this thread is dated from 2017 and honestly I thought nobody was workink on that anymore, but I appreciate your effort.

Thank you,
Felipe.


----------



## ZVI

Hi Felipe,

Thank you for your comments and interest.
Yea, it’s old thread to be actual, but at least good to be exercise.

Certainly, the speed of UDF realized in VBA is slower than the same in XLL.
But it’s fast enough even with 32/64 bit bridge - testing UDFs with the original example "XtrFun Declarations Release 200103.xls" was fast (milliseconds).

More details about the bridge:

1. There is original 32-bit DLL with documented description of all its exported functions (Declare Function …).
Those functions can be called from VBA of Excel 32 bit directly, but not from VBA of Excel 64 bit, because of the difference in the memory models.

2. EXE bridge is 32bit compiled in MS Visual Studio application with all DLL's declarations (Declare Function …) in the code.
EXE provides communication between 32 bit DLL and 64 bit VBA of Excel.
EXE can’t be universal for other DLLs because all declarations of exported functions should be explicitly written and compiled in the EXE.

3. VBA XLAM AddIn in 64 bit Excel uses EXE’s interface to call DLL functions.
XLAM provides Excel with UDFs similar to XLL.

Not a lot of magic here, just a lot of code and testing.

Saying about AddIn from scratch I meant VBA XLAM, not C XLL, it was just the comment, not intention.

 Regards


----------



## felipeavf

Hi @ZVI, 

Great you have tested that already and there is no performance degradation.
It seems that you already gave a huge step ahead on this project.
I'm looking forward to see the result.
When do you think that you will be able to release a stable version of this bridge that can be used by a common user like me?

Thanks,
Regards,
Felipe.


----------



## felipeavf

Hi @ZVI,
I was wondering here if you had any chance to work on it and could solve this challenge?
Also, I was trying to extract the functions from the xll, and load them in a normal and simple VBA project (it would be much easier for me). But I'm not sure if it's possible.
Please, give me some light.

Thank you,
Felipe


----------



## ZVI

felipeavf said:


> Hi @ZVI,
> ... I was trying to extract the functions from the xll, and load them in a normal and simple VBA project (it would be much easier for me). But I'm not sure if it's possible.


Hi Felipe.

There is no source code in XLL/DLL as it's just compiled C-code which is not embedded instead of VBA code.
Now I'm ready to share the link to the previously mentioned Add-In for 32/64-bit versions of Excel.

Regards,


----------



## ZVI

XtrFun64.xlam Add-in for Excel 32/64-bit.

Download link - 'https://app.box.com/s/bav7sih1r2okb7j5ique62yi0dsgqqv7'
It's free just like the original DLL/XLL:
Interpolate, Spline, and Curve Fit for Excel 32/64-bit.
The (c) Scott Allen Rauch XtrFun.dll 32-bit from http://www.xlxtrfun.com is used.

Installation instruction:

1. Unzip files from XtrFun64.zip to any installation folder on a local disk.
List of the files in archive:
XtrFun.dll – 32-bit original DLL.
XtrFun64.exe – bridge between 32-bit XtrFun.dll and XtrFun64.xlam 32/64-bit.
XtrFun64.xlam – Excel Add-In.
XtrFun64_Examples.xlsx – usage examples.

2. Open Excel and install XtrFun64.xlam Add-In:
File - Options – Add-ins – Go – Browse – select XtrFun64.xlam - Ok

Load and play with XtrFun64_Examples.xlsx

In Excel use FX formula toolbar to see functions of the Add-In in 'XtrFun64 Library' category.
There is no XtrFun64.chm help file yet.

Links:
'http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm'
'http://www.cma4ch.org/chemo/pubbl/XlXtrFun-copy.html'
'http://www.cma4ch.org/chemo/pubbl/XlXtrFun-copy.html#softw'


----------



## felipeavf

Hi @ZVI 

I just tested your solution and I found some difficulties that would like to share with everyone here...

I did the installation exactly as your request, but as I'm using a company's PC, there are some Virus policies to protect and I had to bypass it doing the following steps:

I had to add the folder where I extract the Zip file to the Virus and Threat Exclusions List
I had to add the folder C:\Users\(my username)\AppData\Local\Microsoft\Windows\INetCache\Content.MSO to the Virus and Threat Exclusions List
If these two first steps weren't done before to try to install the add-in, another error will be found


  to solve it, go to <File - Options – Add-ins – Go – Browse – select XtrFun64.xlam - Ok> again
Once have done it, Had to run XtrFun64.exe as Administrator at least once.
Then, the Add-in started to work!

I just notice that a lot of other functions didn't show up in the list (like the "interp3D").
Can you add all these functions on a new release, please?

Thank you,
Felipe.


----------



## felipeavf

Hi @ZVI 

Just something I noticed on my Excel behavior from now on, after have installed this add-in is that when I open the program, it doesn't show up the Start Screen anymore. Instead, a blank spreadsheet pop up, not respecting the option to see the Start Screen first: 






Any way to change it?

Thank you,
Felipe.


----------



## ZVI

felipeavf said:


> .. I just tested your solution and I found some difficulties that would like to share with everyone here...


Hi Felipe,

Thank you for testing and for sharing your installation experience.
In my testing Windows Defender antivirus software was used with no such issues.



> Then, the Add-in started to work!


Glad you got it all working!



> I just notice that a lot of other functions didn't show up in the list (like the "interp3D").
> Can you add all these functions on a new release, please?


Actially, all 1D and 2D functions are realized:

ddydx(ArrayOfXs, ArrayOfYs, GivenX)
dydx(ArrayOfXs, ArrayOfYs, GivenX)
IndexOfClosestValue(ArrayOfValues, ValueToSeek)
IndexOfMaxDouble(ArrayOfDoules)
Interp(ArrayOfXs, ArrayOfYs, GivenX)
Interpolate(ArrayOfXs, ArrayOfYs, GivenX, [Extrapolate], [Parabolic], [Averaging], [SmoothingPower])
Intersect(FirstCurveXs, FirstCurveYs, SecondCurveXs, SecondCurveYs, [GuessX], _
               [nInterpolateSpline1],  [nInterpolateSpline2], [dAccuracy], [lMaxIterations], [dh])
LookupClosestValue(ArrayOfValues, ValueToSeek)
LookupClosestValue2D(XYArray, ArrayOfXKeys, ArrayOfYKeys, XValueToSeek, YValueToSeek)
Pfit(ArrayOfXs, ArrayOfYs, GivenX, order)
Spline(ArrayOfXs, ArrayOfYs, GivenX)
vba_InteriorAngles(X1, Y1, X2, Y2, X3, Y3, [TrueForRadiansFalseForDegrees], [DeltaYOverDeltaX])
XatY(KnownXArray, KnownYArray, PeakValleyOrY, [GuessX], [GivenY], [Extrapolate])
Click the Fx formula bar and select the "XtrFun64 Library" category to view their list and argument details.

Only two 3D functions are missing: Interp3D and InterpMatrix.
I will add them into the next version, but only if they are supported by XtrFun.dll



felipeavf said:


> ... after have installed this add-in is that when I open the program, it doesn't show up the Start Screen anymore. Instead, a blank spreadsheet pop up, not respecting the option to see the Start Screen first


My bad, it was my preference for debugging. I will fix it in the next release.

Regards,


----------



## Tronen

Hello:

I'd been using this addin called XlXtrFun for years. It is very useful mainly for interpolate (splines, etc..). Now the problem comes because I suspect this addin doesn't work for 64 bit Excel versions.

When we are trying to load the addin it appears a message when Excel is opened: "The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?" If Yes is selected then Excel closes. If No is select the addin is not loaded.

We web site for the adding is this:

http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm

I have tried to contact with support@xlxtrfun.com but this address doesn't work because the web site is a little bit old.

I think it could be possible to make this addin work for a 64 bit Excel. In this sense I have found this site

http://www.dllfoot.com/fixing/xlxtrfun.xll.html

 but I don't understand what they try to explain and it is needed to used a suspicious program called DLLEscort_Setup.exe and a process a little bit dark...

Any other ideas would be welcome.


----------



## felipeavf

Hi @ZVI,

Thanks for your great support on that again! 

Regarding your comments...


ZVI said:


> Thank you for testing and for sharing your installation experience.
> In my testing Windows Defender antivirus software was used with no such issues.


Yeah, I had a little bit of pain in here to make things work, but seems to run pretty well now, with no issues...



ZVI said:


> Click the Fx formula bar and select the "XtrFun64 Library" category to view their list and argument details.


Yeah, and actually it works as the same as any other function, just inserting a "=" signal in the cell followed by the first letters of the function (a drop-down list will be shown with the all the functions, including functions within "XtrFun64 Library".



ZVI said:


> Only two 3D functions are missing: Interp3D and InterpMatrix.


Sorry, I mentioned "a lot", but actually the only one I tested was the Interp3D, because it was exactly the one I'm interested on...
I supposed you worked first on the 1D and 2D functions and left the multi-dimensional ones behind just to make things simpler.



ZVI said:


> I will add them into the next version, but only if they are supported by XtrFun.dll


I'm not sure what you mean, but I really expect they are supported! There would be any reason to don't be?
Anyways, I'm glad you will give a try!

Thanks!
Felipe.


----------



## felipeavf

Hi @ZVI 

Any news regarding the implementation of the two missing functions?
Are they supported by XtrFun.dll?

I appreciate if you can give me any idea of when the next release will be avaliable.
Thank you!
Best regards,
Felipe.
@felipeavf


----------



## ZVI

felipeavf said:


> Hi @ZVI
> 
> Any news regarding the implementation of the two missing functions?
> Are they supported by XtrFun.dll?
> 
> I appreciate if you can give me any idea of when the next release will be avaliable.
> Thank you!
> Best regards,
> Felipe.
> @felipeavf


Hi Felipe,

Sorry for the delay in answering.

The Author of XtrFun.dll warned that the DLL is incomplete.
For example, XatY function and extrapolating argumenrs are not supported by DLL at all - I inserted my own code into the EXE to support XatY and extrapolating arguments.

The next release with implementation of the two missing 3D functions will be available this weekend, I'll provide the link here.
It is known that HLP files are not supported in the modern Operating System, rewriting of the XtrFun64.hlp to XtrFun64.chm format is required.
Hope that the XtrFun64.chm help file will be ready and included in the expected release.

Regards


----------



## felipeavf

Hi @ZVI, 

Thanks for your update. I have been out for a couple of days. Sorry my delay too.

Thanks for inserting your own code into the EXE file to suport that XatY.
Luckily you don't need to do it for the 3D functions, right?

I don't see any advantage in make the hlp file works, tbh. But supposedly for new users, it can be good. So, if it's not a big deal for you, it's ok, otherwise you can focus on the functions itself.

Thank you!
Regards,
Felipe.


----------



## Lexismom

@ZVI, thanks very much for this solution.


----------



## felipeavf

Hi @Lexismo, nice to see that other people can have the opportunity to use the tool solution that has been created by @ZVI

Cheers!
Felipe.


----------



## felipeavf

Hi @ZVI, any good news regarding the 3D functions?

Thanks!
Felipe.


----------



## felipeavf

Hi @ZVI , how are you doing? I haven't any answer from you for a long time. I suppose you've been too busy to work on this project. Are you still available to develop the solution for the 3D functions?

Hopping to hear from you soon.

Thank you,
Felipe.


----------



## Bill_F

Hi ZVI ,

I just wanted to give you a big thanks for posting your solution for making XlXtrFun work on the latest versions of Excel.  I just upgraded from Excel 2010 to MS 365 and was sad to find the XlXtrFun no longer working in the 64bit version.  I installed your solution as you described in this thread and was happy to see that I had XlXtrFun back!!! 

Thanks again,
Bill


----------



## felipeavf

Hi @ZVI, although I really thank you to develop the 2D functions solution, I would like to check if are you still keen to develop the solution for the 3D functions?

Thank you,
Felipe.


----------



## Tronen

Hello:

I'd been using this addin called XlXtrFun for years. It is very useful mainly for interpolate (splines, etc..). Now the problem comes because I suspect this addin doesn't work for 64 bit Excel versions.

When we are trying to load the addin it appears a message when Excel is opened: "The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?" If Yes is selected then Excel closes. If No is select the addin is not loaded.

We web site for the adding is this:

http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm

I have tried to contact with support@xlxtrfun.com but this address doesn't work because the web site is a little bit old.

I think it could be possible to make this addin work for a 64 bit Excel. In this sense I have found this site

http://www.dllfoot.com/fixing/xlxtrfun.xll.html

 but I don't understand what they try to explain and it is needed to used a suspicious program called DLLEscort_Setup.exe and a process a little bit dark...

Any other ideas would be welcome.


----------



## Dark Avenger

Hi @ZVI,

Thanks a lot for your post and help to make it compatible with 64 bits version of Microsoft Office.
I would like to know if you have posted your source code on Github (or similar) so the community can support your work.
I'm a dev myself and might help you complete your current work on it.
Thanks a lot !


----------



## luisen

Hi @ZVI, 

Thanks a lot for your post and for taking the time and effort to make this work!

Congrats and Happy New Year!


----------

