James A Mohler
James A Mohler

Reputation: 11120

Using Spreadsheet in Query of Queries

I am reading a spreadsheet any trying to then run it in a query or Queries

<cfspreadsheet action="read" 
     src="#request.dropfolder##arguments.DSN#" 
     name="qryFromFile" 
     excludeHeaderRow="true" 
     headerrow="true"> 


<cfquery name="qryResult" dbtype="query">
    SELECT  EID
          ,  CAST(#arguments.Config[2]# AS Decimal) AS [Value]
          , 0 AS Invalid
          , '<li><span><b>Comments:</b></span>' + Comments + ' on <time>' + [Date] + '</time></li>' AS Skyhook
    FROM    qryFromFile
    ORDER BY EID
</cfquery>

enter image description here

Do I have to beild the table piece by piece?

Upvotes: 0

Views: 108

Answers (1)

Tim Jasko
Tim Jasko

Reputation: 1542

To get CF to stuff the contents into a query, you need to use the "query" attribute, not the "name" attribute

<cfspreadsheet action="read" 
       src="#request.dropfolder##arguments.DSN#" 
       query="qryFromFile" 
       excludeHeaderRow="true" 
       ... > 

Upvotes: 2

Related Questions