Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ADO and Excel file locked for editing

Posted on 2009-05-04
1
Medium Priority
?
470 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

886 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