Solved

ADO and Excel file locked for editing

Posted on 2009-05-04
1
463 Views
Last Modified: 2012-05-06
I am using ADO to import Excel data into an ADO Table and DBGrid.

The problem I have arose since moving from Delphi 7 to Delphi 2009.

I can connect to the Excel workbook and select any worksheet on the first try. But if I leave my import wizard and return immediately to it , I cannot select a worksheet other than the first worksheet.

After doing this, if I then open the Excel file using Excel I get the message that the file is locked for editing. The designated user is myself.

The only way I can connect to the Excel file a second time, and select any worksheet,  is to close and reopen my application.

The  original Excel file has no security protection or locked cells

I have ensured that the ADO Table is closed when leaving the Wizard.
0
Comment
Question by:Dennis_Treacy
[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
 

Accepted Solution

by:
Dennis_Treacy earned 0 total points
ID: 24302542
Problem solved - I did not disconnect from Excel after getting a list of worksheet names
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi - replicating a form 8 111
Delphi application Soap connection 5 152
Delphi Yen format 3 71
QuickReport, Delphi, Shape 12 47
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

732 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