I'm working on a system to get data from an Excel using the  POI Utility 
ColdFusion component. I'm almost there, but down to the last little 
fiddly bits and am having a small problem.

OK, I've gotten the excel sheet imported and I set a variable 
"qSheetData" that I can use as a query:


<cfset qSheetData = objSheet.Query />
<cfdump var="#objSheet.Query#">

Looking at the dump above, I get a nice pretty dump of my data all in 
the correct columns like:

query - Top 6 of 6 Rows
        COLUMN1 COLUMN2 COLUMN3                 COLUMN4
1       Tom     Smith   [EMAIL PROTECTED]       Test Group
2       Zom     Murphy  [EMAIL PROTECTED]       Test Group
......

So, everything is working great up to here. Now, since "qSheetData" is 
my query object, I should be able to loop it like any other query and 
add the rows to my database.

<cfloop query="qSheetData">
   <cfset str.ml_firstname = qSheetData.column1 />
   <cfset str.ml_lastname = qSheetData.column2 />
   <cfset str.ml_email = qSheetData.column3 />
   <cfset str.other = qSheetData.column4 />

....query here, blah, blah...

</cfloop:

Except, I'm getting an error;

Attribute validation error for tag cfloop.
The value of the attribute query, which is currently "qSheetData", is 
invalid.

The dump showed "qSheetData" to be a valid query object, correct? So, 
what's wrong with the loop?

I've been working on this thing most of the day, so I bet it's something 
obvious I'm just not seeing right now...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to