Solved

Link a field in excel worksheet to a textbox on a delphi form via ADO

Posted on 2003-10-28
1
771 Views
Last Modified: 2010-04-16
Hi all,
I have managed to create connection to the excel  worksheet and i can show it in datagrid. Now I have 2 problems:

1) how to link a particular field (name) in excel worksheet to a textbox on the delphi form.

2) any link that can show me how to add and update records in excel worksheet via ADO Connection?

Thax.
Rice Cake
0
Comment
Question by:antioch_75
1 Comment
 
LVL 1

Accepted Solution

by:
JackNaif earned 250 total points
Comment Utility
1) Instead of a normal edit box try using a dbedit. (I assume that when you say a datagrid you mean a dbgrid. dbedit is similar, but it's got one mor DB related property to choose the field it's going to contain.

2) At http://www.phidels.com/php/zip/oleexcel.zip you have a wonderfull example of how to interact with Excel but a) it's in French b) it uses Ole rather than Ado.

Anyway, if you already know how to use a normal Dataset to update and add records, and you've managed to open the excel via ADO, then updating and adding records through ADO should be a piece of cake because the TADODataSet has all the same methods and properties and events than the TDataSet. You shouldn't need too much of an example to do it.

Hope it helps:

Jack
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

8 Experts available now in Live!

Get 1:1 Help Now