AnsweredAssumed Answered

MonkeyBread Software, Excel functions:  install LibXL library

Question asked by justinc on Aug 23, 2017
Latest reply on Aug 24, 2017 by monkeybreadsoftware

I have a process that I'm creating that will export a rather custom-styled Excel spreadsheet.  I'm using MonkeyBread Software's plugin to do this.  However, this plugin requires a 3rd party library to work - "LibXL".  I'm trying to automate the installation of the LibXL library, so that new users, or users who haven't run this yet, will get all the plugins correctly installed in order to generate this output.  Both the MBS plugin file and the LibXL library file are being stored in a centralized remote file.  The users will be connecting to a different solution/DB file hosted on the same server.  I have a process in place to install the MBS plugin itself, but getting the LibXL library exported from the system is proving more difficult.


I was trying to use FM's own 'Install Plug-in' step so that the library file would exist alongside the MBS plugin.  (If it is stored in the Plugin location, then it is initialized a bit more easily.)  But that doesn't work - I'm guessing because FM wants to load the plugin after 'installing' it, and it isn't an FM plugin itself, just a library file.


I could use the MBS "Container.WriteFile" step - but then I'd need to know the path to write it out to.  Is there a way to dynamically determine the Plugin folder's path?  Maybe it's OK to just use the standard path's FM defines...but I was concerned that wouldn't be terribly stable - that perhaps there were ways that Extensions path could be different from the default path (i.e. installed in a different location in some manner).


I don't want to put it in the Temporary directory because then it would get removed whenever FM exited, and need to be reinstalled from the remote DB.  (It's not a small file and causes noticeable delays when it's first installed.)


Similarly, the Documents path isn't ideal because the user could mess around with it - delete it, move it, etc.


Does anyone else use these Excel functions, and have a working system for installing the 3rd party LibXL library?


Is it possible to run this on the server somehow, so that the MBS plugin and LibXL library are installed there?  Would have to recreate the record context, generate the Excel, and save it back to a container somewhere - then have the user's system export that container to the desktop or some other path.  That could work...MBS has the "XL.Book.Save" function that sounds like it will write the Excel directly to a container, so wouldn't need to export/import it on the server side.