Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 53 Excel Wrapper MacBook Issue #1732

Closed
lhanania opened this issue Aug 31, 2018 · 5 comments
Closed

Error 53 Excel Wrapper MacBook Issue #1732

lhanania opened this issue Aug 31, 2018 · 5 comments
Labels
OS-OSX Issues related to the macOS operating system
Milestone

Comments

@lhanania
Copy link

Hello,

I am required to run the CoolProp (V 6.1.0) wrapper for excel for one of my classes. I have Excel 2011 (Version 14.7.7) and I am running OS10.13.6 (High Sierra). I followed the instructions in http://www.coolprop.org/coolprop/wrappers/Excel/index.html#excel.

First issue I ran into was in part 4. Once I added the Add-in "CoolProp.xlam" it would not compile. The code had a comment saying I have to delete some " PtrSafe" function delclaration if I have an older version, and since I do I went ahead and deleted all "PtrSafe" declarations and they code compiled.

Second issue I am currently running into is in part 5. When I test it by running "=PropsSI("T","P",101325,"Q",0,"Water")" the error 53 message pops up. Although I do have "libCoolProp_32bit.dylib" in the directory mentioned in the instructions. Attached is a screenshot of the error.
screen shot 2018-08-31 at 11 48 27 am

I ran the file command for libCoolProp_32bit.dylib and I get the i386 number mentioned in the link for the instructions.

Please help me asap as I need this up and running for my lab experiments.

Thank you,

@lhanania
Copy link
Author

Update:

In terminal, I navigated to Library/Group Containers/UBF8T346G9.Office and ran the command "libCoolProp_32bit.dylib" and I got "libCoolProp_32bit.dylib: Mach-O dynamically linked shared library i386".

This verifies I have the correct 32 bit dylib file.

I am thinking excel is not reading from that directory, although I have the CoolProp.xlam file in there too.

Ian, please help me out. I really appreciate it.

Thanks

@lhanania
Copy link
Author

Update:

In terminal I ran the "otool -L libCoolProp_32bit.dylib" command (I was in Group Containers and in UBF8T346G9.Office when I ran it and I got the following:

libCoolProp_32bit.dylib:
libCoolProp.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)

Hopefully this will help in diagnosing my issue.

Thank you again

@lhanania
Copy link
Author

lhanania commented Sep 1, 2018

Update:

Based on what alchemyst said and did in #1430 I did the following.

In the VBE in excel, I accessed the code for CoolProp and I changed the following:

Private Declare PtrSafe Function PropsSI_private Lib "libCoolProp.dylib" Alias "PropsSI" (ByVal output As String, ByVal Name1 As String, ByVal Value1 As Double, ByVal Name2 As String, ByVal Value2 As Double, ByVal Ref As String) As Double

*Note: I changed two of the same lines, one for the "If MAC_OFFICE_VERSION >= 15 And VBA7 Then �" loop and one for the "Else ' 32-bit Excel for Mac" loop.

I changed them to:

Private Declare Function PropsSI_private Lib "/Users/LaithHanania/Library/Group Containers/UBF8T346G9.Office/libCoolProp_32bit.dylib" Alias "PropsSI" (ByVal output As String, ByVal Name1 As String, ByVal Value1 As Double, ByVal Name2 As String, ByVal Value2 As Double, ByVal Ref As String) As Double

I saved the code (CMD+S) and ran the test function "=PropsSI("T","P",101325,"Q",0,"Water")" and finally got 373.124 and no error 53 message.

Before I can sleep peacefully, I would like someone to verify that this does not and will not affect any functions of coolprop as I need this for many lab experiments for my class and I am not that great of a coder so Im not 100% sure of the effects of changing the code like that.

I also tried quitting excel and opening up a new workbook and it worked too so I'm guessing the code got saved with the (CMD+S) key command.

I will test it with values I can expect and compare the output. Please let me know if this is a valid and safe method to get it to work. I need the most accurate data I can get from CoolProp as my lab grade depends greatly on my lab work.

Thank you

@ibell
Copy link
Contributor

ibell commented Oct 14, 2018

See also #1744

@ibell ibell added the OS-OSX Issues related to the macOS operating system label Oct 14, 2018
@ibell
Copy link
Contributor

ibell commented Jan 11, 2019

Closing due to lack of feedback. Feel free to re-open

@ibell ibell closed this as completed Jan 11, 2019
@jowr jowr added this to the v6.3.0 milestone Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-OSX Issues related to the macOS operating system
Projects
None yet
Development

No branches or pull requests

3 participants