usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.
193 stars 127 forks source link

Excel xla enabling using excel for mac #480

Closed bstap closed 1 year ago

bstap commented 2 years ago

Dear mr, mrs,

I would like to use the ref prop calculation in excel, but have difficulty to link the dll.

My operating system is: macOS Big Sur with an Intel Core i7 processor Excel version is: Microsoft Excel for Mac version 16.58

I have changed in Visual Basic the references to the dll as shown below in both the xls as well as the xla:

'Set the path to the fluid files. 'Comment out the following line to not use the directory in the RPPrefix environmental variable: 'hFld = Trim(Environ("RPPrefix")): If Right(hFld, 1) = "\" Then hFld = Left(hFld, Len(hFld) - 1) 'Any path can be set with the following line: hFld = "/Users/bartvanderstap/documents/REFPROP/" If hFld <> "" Then hIn = "PATH": Call REFPROPdll(hFld, hIn, hOut, 0&, 0&, 0&, 0#, 0#, z(1), Output(1), hUnits, iUnits, x(1), y(1), x3(1), q, ierr, herr, 10000&, 255&, 255&, 255&, 255&)

However, this doesn’t seem to work and I am running out of idea’s to get it working …

Could you assist me or give me instructions to get it working ?

Many thanks, Bart

.

ianhbell commented 2 years ago

It is not that simple. You need to compile the shared library yourself, and follow these instructions: https://github.com/usnistgov/REFPROP-wrappers/tree/master/wrappers/Excel#for-osx-with-office-365