Web Trenches

Getting CFSPREADSHEET working on Lucee In the server context

Andrew Kretzer (Leftbower) did a great job of porting the Team CFAdvance cfspreadsheet-railo extension over to work with Lucee.  Since we have multiple sites (contexts) running on our servers, I needed his cfspreadsheet-lucee extension to install at the server context instead of individually for each site.  The default intall of cfspreadsheet-lucee installs only on the web context.  After much struggling, here is what finally got it working on the server context.

  1. Download the cfspreadsheet-lucee extension from GitHub.  Get the full zip file.
  2. Follow his instructions for setting up your own custom extension provider (in README.md).  You can test this if you want by adding it to Providers in your Lucee admin, but don't install cfspreadsheet yet. 
  3. In your new extension provider folder (http://your_local_site_host/luceeExtensionProvider), you will need to change several files.
    1. Edit ExtensionProvider.cfc and change the line QuerySetCell(apps,'type','web'); to QuerySetCell(apps,'type','server');
    2. Unzip the cfpoi.zip file.  
    3. Edit installFolder.cfc.  Replace all instances of the string "lucee-web-directory" with "lucee-server-directory".
    4. Unzip the nested cfpoi.zip (yes, there is a cfpoi.zip inside cfpoi.zip).  
    5. Within that folder, edit spreadsheet/spreadsheet.cfc.  Again, replace all instances of the string "lucee-web-directory" with "lucee-server-directory".
    6. Now, you need to zip cfpoi.zip all back up in the exact structure it had previously.  You'll end up with cfpoi.zip inside a cfpoi.zip, like it was before.  Be careful to only zip the contents of the directories into these files.  I messed this up multiple times – I kept zipping the cfpoi folder instead of its contents, and I ended up with zip files that contained one folder called cfpoi.  That won't work.
  4. Replace the existing cfpoi.zip in /luceeExtensionProvider with your newly edited and zipped file.
  5. On your Lucee server, you will need to create the following directory if it does not exist already: {lucee_install_dir}\lib\lucee-server\context\components  
  6. Now, add your custom extension provider to your server admin (if you haven't already).
  7. Click on Applications in the server admin, and you should now see CFSPREADSHEET and can install it.
  8. UPDATE: Based on feedback below, I added this step.  It may not be necessary in all configurations.
    In the server administrator, go to Archives & Resources > Component.  Create a New Additional Resource…
    Name: Server Components
    Resource: {lucee-server}/components/
    (other options default)

After this, all of your sites (contexts) will have cfspreadsheet available!


13 Replies to “Getting CFSPREADSHEET working on Lucee In the server context”

  1. v 4.00 getting an error:
    error occured in zip://C:\lucee\lib\lucee-server\context\extensions\4C901E6B63FD9B49107D97B6E2C67D33\4.00.rep!/InstallFolder.cfc:77
    called by zip://C:\lucee\lib\lucee-server\context\extensions\4C901E6B63FD9B49107D97B6E2C67D33\4.00.rep!/Install.cfc:26
    called by zip://C:\lucee\lib\lucee-server\context\extensions\4C901E6B63FD9B49107D97B6E2C67D33\4.00.rep!/Install.cfc:41

  2. Got this fixed… had a corrupted archive and had to manually uninstall ALL of the archive pieces by hand (including files in \lucee\lib\lucee-server\context\components AND \lucee\lib\lucee-server\context\extensions).

    For the record: “your_local_site_host” mentioned is in \lucee\tomcat\webapps\ROOT for the location to create the ‘luceeExtensionProvider’ directory and is accessed by


  3. @Randy – Glad it worked out for you. When you say that you had a corrupted archive, do you mean that the one on Github is corrupted when you download it? It seems like it is valid to me, but wanted to check.

  4. I followed the steps precisely, but when try to make a call to cfspreadsheet in a test page, i get this:

    Invalid component definition, can’t find component [org.cfpoi.spreadsheet.Spreadsheet]

    The Error Occurred in
    C:\lucee\lib\lucee-server\context\library\tag\spreadsheet.cfc: line 145

    called from C:\inetpub\wwwroot\sandbox\spreadsheet.cfm: line 15

    Any thoughts?

  5. I had a similar issue when I was setting this up. It turned out that I had zipped the files one level too deep. Check this path on your server…


    I had two nested cfpoi folders in there. It should be org > cfpoi > spreadsheet.

    If you don’t have access at the server level, then check your cfpoi.zip file to make sure only the contents of the cfpoi folder are zipped, and not the folder itself.

  6. Michael-

    I actually did check that and do indeed have the path just like that.

    I solved it by doing this:
    in server admin archive & resources -> Component , I added an additional Resource:

    name = “server comps”, resource = {lucee-server}/components/

    after noticing that I only had
    name =”default”, resource= {lucee-web}/components/

    Then it worked..
    are you saying I should not have had to do that?

  7. @Scott – that is odd. I did not have to do that on any of the sites I use this on. Maybe a slightly different Lucee version, or even some configuration change that was made that removed a mapping? Well, hopefully if others run into it they will see your post and have a solution.

  8. Michael – I had the same issue as Scott. I added the Component directory in the Lucee server admin just as he did and the code worked and exported the XLS file as expected.

    I had just upgraded Lucee to the latest stable version (Lucee final at time of this writing) FWIW.

  9. I am trying to install this. I am running Lucee with IIS so the root of the applicaiton is in c:\inetpub\htdocs\ and not in c:\lucee\etc…
    Things go well right up to the point of installing this in Web Admin -> Extension -> Applicaitons. When I click the install icon for I get the page with the Install button and cancel. When I click install I get these errors:

    missing config file in extension package

    error occured in /context/admin/extension.applications.install2.cfm:66
    called by /context/admin/extension.applications.cfm:98
    called by /context/admin/web.cfm:389
    file or directory zip://C:/lucee/tomcat/webapps/ROOT/WEB-INF/lucee/extensions/4C901E6B63FD9B49107D97B6E2C67D33/4.00.rep!/config.xml not exist

    error occured in /context/admin/extension.applications.install2.cfm:110
    called by /context/admin/extension.applications.cfm:98
    called by /context/admin/web.cfm:389

    Any advice on how to handle installing to a path that is not the default Lucee installation directory?

  10. As a followup to my previous question. I was able to make this work.
    The key was to pay very close attention to where you are making these changes. Lucee has a Server and Web administrator and the goal of this post it so work in the Server and not the Web administrator.

    Secondly, unzipping, editing, and re-zipping the files is tricky. If you use Windows, the behavior of Windows is to zip extra folders into and out of zip files. This is a pain.
    luceeExtensionProvider/cfpoi.zip/cfpoi.zip/spreadsheet/Spreadsheet.cfc is the path to the deepest cfc you will edit.

    You can place the luceeExtensionProvier into a path other than the lucee root context directory. (like c:\inetpub\htdocs\sitename) just make sure that the URL you put into the Server -> Extension -> Providers area is accessible such as http://www.mysitename.com/luceeExtensionProvider/ExtensionProvider.cfc

  11. Thanks Tim. I was planning to get back to you today, but you solved this quicker than I would have.

Leave a Reply

Your email address will not be published. Required fields are marked *