Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

inserting data into Excel sheet

Posted on 2003-11-12
1
Medium Priority
?
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 17

Accepted Solution

by:
anandkp earned 600 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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What You Need to Know when Searching for a Webhost Provider
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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