Solved

ADO and Excel file locked for editing

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

734 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