hi all, how to add a module to Lucee inside box en...
# box-products
r
hi all, how to add a module to Lucee inside box environment? Some part of code uses CFSPREADSHEET which works ok on classic Lucee, but not works under box-ed Lucee. I understand there's Google but today is Friday and this channel is always so helpful! 🙂
install 037A27FF-0B80-4CBA-B954BEBD790B460E
Oh thank you very much, Rodyon, that's what I was looking for!
😂 2
c
By, the way, I have been working on a fork of this repo and have added quite a few updates, which I will be releasing sometime this year? 🙂 https://github.com/charlesr1971/cfspreadsheet-lucee-5 I have done quite a bit of work on the cell formatting side, especially with:
Copy code
SpreadsheetAddColumn()
https://github.com/charlesr1971/cfspreadsheet-lucee-5/blob/7c3b750c57144a2846f837e8acbf38a0ad1e6ee0/lar/org/cfpoi/spreadsheet/Spreadsheet.cfc#L1302
👏🏾 1
b
The only caveat to using
install
to pull the Lucee extension from ForgeBox is • if the CommandBox server is already defined, it will put the lex file in Lucee's
deploy
folder automatically like you want • If you run the install FIRST before ever starting the server, CommandBox won't know what to do with the lex so it will just dump it in the current working directory, which won't install it.
👍 1
👍🏼 1
If you find yourself in a position where you want to have the lex file already installed the first time the server comes up, you can use the
Copy code
LUCEE_EXTENSIONS=037A27FF-0B80-4CBA-B954BEBD790B460E
env var, which Lucee will pick up automatically when it stats and it will download the lex then.
👍 1
@rodyon
d
Just curious @rodyon and @Charles Robertson - have you checked out https://forgebox.io/view/spreadsheet-cfml? Is there a reason you are using the extension vs this package? We’ve cfsimplicity’s package for years now and it has been great, but just wondering if I’m missing out on something.
c
@danmurphy Tag support: It’s actually pretty simple [no pun intended 😊], cfsimplicity has no support for the tag:
Copy code
<cfspreadsheet />
Now, this may not be a big deal for your project, but we are in the middle of a massive migration, which uses the tag extensively. Scripting support: Also, we found that cfsimplicity failed in Lucee, straight off the bat, whereas
cfspreadsheet
just parsed the ACF spreadsheet scripting syntax, without any trouble. We didn’t really analyse where the issue was, we just ran 5 or 6 templates/CFCs that contained spreadsheet syntax and
cfspreadsheet
successfully handled all of them, even after we added the necessary, component path syntax, before the spreadsheet methods, in cfsimplicty So, I am not entirely sure that the scripting syntax in cfsimplicity matches the current ACF directive? But I cannot really comment on this, with any confidence, as we didn’t have time to do a deep dive into the pain points. Installation: Installing the extension is not a big deal. Just log into the administrator and install. In fact, I would say it’s easier to install the extension than add the necessary mapping and paths that cfsimplicity requires? Usage: This is how I see it. If you are doing an ACF to Lucee migration, you might find
cfspreadsheet
is a better option. If you are building a new application from scratch, you might find cfsimplicity is better? And, hey, you could use both! 👊 Editing: The more difficult prospect is trying to edit the extension. But that’s for me to worry about. 😀
In the spirit of fairness, I just want to add, a small caveat, concerning the
cfspreadsheet
extension. Once we committed to
cfspreadsheet
, we found that we got about an 90% success rate with all our individual instances of spreadsheet syntax, in our templates/CFCs. The main offenders were:
Copy code
SpreadSheetNew()
SpeadSheetAddRow()
The issues here, turned out to be minor. It seems that a couple of small adjustments in the way the params are handled, resolved any issues. For instance, the column param in:
Copy code
SpeadSheetAddRow()
Cannot be zero in Lucee. It must be one or greater. So, not even
cfspreadsheet
is 100% effective, when carrying out an ACF to Lucee migration. 😬
c
I am not entirely sure that the scripting syntax in cfsimplicity matches the current ACF directive?
spreadsheet-cfml was never meant to support the ACF syntax directly, although the function calls are similar enough to be easily adapted. However it is intended to match and exceed the functionality available in both ACF and the Lucee extension, and fix issues.
I would say it’s easier to install the extension than add the necessary mapping and paths that cfsimplicity requires?
spreadsheet-cfml doesn't require a mapping.
If you are doing an ACF to Lucee migration, you might find
cfspreadsheet
is a better option.
If you are building a new application from scratch, you might find cfsimplicity is better?
Totally fair!