spreadsheet cfc problem

202 views
Skip to first unread message

Henry Gelstor

unread,
Aug 3, 2016, 2:22:11 PM8/3/16
to Lucee
I am attempting to use the cfsimplicity cfspreadsheet cfc library to read a simple spreadsheet into a query.
Using the example code from github I have this:

<cfscript>
mypath="file.xls";
spreadsheet=New spreadsheet_cfc.Spreadsheet();
myQuery=spreadsheet.read( src=mypath,format="query" );
</cfscript>

I get this error The key [WORKBOOK] does not exist, but there is a similar key with name [WORKBOOKFROMQUERY] available.
The error occurred on line 870 in file spreadsheet_cfc/Spreadsheet.cfc.

This is on a fresh install of Lucee 10,0,0,0 on Linux 3.10.0-327.18.2.el7.x86_64

Can anyone help?  I am new to Lucee and missing something...

AJ Mercer

unread,
Aug 3, 2016, 6:20:32 PM8/3/16
to lu...@googlegroups.com
Might n ed the full path to the file
--
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/dbb7efeb-4b4c-4424-8aa6-502734cda04e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Message has been deleted

AJ Mercer

unread,
Aug 3, 2016, 8:39:34 PM8/3/16
to lu...@googlegroups.com
still guessing - what version of excel is the file?

On 4 August 2016 at 07:45, Henry Gelstor <henry....@gmail.com> wrote:
Thank You but, nope it definitely finds the xls file. When i change it I get a file not found error.
 I did install the cfspreadsheet extension and got an almost identical error message. The difference was "Workbook" and "Book" keys.  Backtracking to the extension examples I found they they worked.  And the spreadsheet file included with the demos works with my test page, just not the spreadsheet I need it to.  I did try renaming the worksheet to"Sheet" to no avail.
i'm going to put the data from mine into a brand new xls.. and then maybe into the demo's sample sheet... see what happens.
Someone out there knows exactly what this error is--   Thx H.


On Wednesday, August 3, 2016 at 5:20:32 PM UTC-5, AJ Mercer wrote:
Might n ed the full path to the file

--
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Julian Halliwell

unread,
Aug 4, 2016, 10:41:20 AM8/4/16
to lu...@googlegroups.com
Sounds like something specific to your XLS file that's preventing it
from being read as a Spreadsheet object.

I'd be happy to take a look if you're able to share the file in
question. You can email it to julianhalliwell at gmail dot com.

Julian (aka cfsimplicity).

Julian Halliwell

unread,
Aug 4, 2016, 3:46:41 PM8/4/16
to lu...@googlegroups.com
Thanks for sending me the file, Henry.

The problem is that the file was created using an older version of
Excel which isn't supported by POI, the Java Library that's used to
provide the spreadsheet functionality.

If you open the file in Excel, do File > Save As... and then choose
"Microsoft Excel 97/2000/XP" as the format, you should find that it
works.

I'll add a ticket to the Spreadsheet Library repo to improve the error
message to warn that files need to be in this format or later.

Cheers
Julian.

Henry Gelstor

unread,
Aug 4, 2016, 4:07:41 PM8/4/16
to lu...@googlegroups.com
Wow! Thanks again for that- No wonder- its over 20 years old! Henry

Julian Halliwell

unread,
Aug 4, 2016, 4:10:57 PM8/4/16
to lu...@googlegroups.com
Ah right, there you go.

I've fixed the error message now so anyone else running up against the
same issue will get a more helpful explanation:

https://github.com/cfsimplicity/lucee-spreadsheet/issues/88
Reply all
Reply to author
Forward
0 new messages