PGS62 / JuliaExcel.jl

Call Julia from Microsoft Excel worksheets and from VBA
MIT License
59 stars 4 forks source link

any plans to allow functions to return structures / objects ? #11

Open Lincoln-Hannah opened 2 years ago

Lincoln-Hannah commented 2 years ago

A common setup with Excel finance libraries is to have a cell hold an object output of a calculation.

Example:
An excel range (A10:B30) stores a yield curve par rates.
A1 points to this range and stores a Julia object of the bootstrapped curve. Trade valuations then just point to A1 to value off the curve.

(Fantastic Package btw :)

Lincoln-Hannah commented 2 years ago

An easy way to get similar functionality would be to combine the JuliaCall and JuliaSetVar functions. So the function result (e.g. a structure) is saved as a global variable instead of returned to the spreadsheet. Other Excel calls could reference the GV by name.

JuliaCalltoGlobalVar( VariableName, JuliaFunction, args... )