Solved

ADO and Excel file locked for editing

Posted on 2009-05-04
1
456 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

943 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

4 Experts available now in Live!

Get 1:1 Help Now