Solved

inserting data into Excel sheet

Posted on 2003-11-12
1
249 Views
Last Modified: 2013-12-24
I am using the following code:

<cfquery datasource="wrightLive" name="getStaff">
SELECT FirstName, LastName, StaffID FROM staff
order by FirstName
</cfquery>

<cfoutput query="getStaff">
       <cfquery datasource="staffstuff">
       INSERT INTO "sheet1$" (
            FirstName,
            LastName,
            StaffID
            )
            VALUES (
            '#getStaff.FirstName#',
            '#getStaff.LastName#',
            #getStaff.StaffID#
            )
       </cfquery>
 </cfoutput>

When I try to run it, I get an error that says, "Operation must use an updateable query".  I have checked that I have permission to write to the Excel file, but beyond that I don't know what else to check!  Help...
0
Comment
Question by:theamzngq
1 Comment
 
LVL 17

Accepted Solution

by:
anandkp earned 200 total points
ID: 9737195
I suppose u have created a DSN for the excel sheet !

make sure - u have UNChecked the "Maintain Connections" under advanced settings of ur ODBC socket DataSources in CFADMIN.

below that u will find options for Allow SQL for "insert" / "update" etc
chk the ones u need

& try again !

let me know

K'Rgds
Anand
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now