Solved

Importing XLS files

Posted on 2006-07-05
5
483 Views
Last Modified: 2011-09-20
Dear Experts,

Is there any good freeware components to work with XLS files (Excel)?
For example I need to import all the sheets of Excel file.


Any help appreciated!
0
Comment
Question by:Marius0188
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:2266180
ID: 17040776
Hi Marius0188,

you could use the activex controls. or if you have delphi 6 or later, when installing you have the option of installing office components.

But you didn't mention: import the sheets into what?
because if you just what to take out the data, you can also use MDAC (using odbc or ado if my memory servers me correctly)

Cheers!
0
 

Author Comment

by:Marius0188
ID: 17041097
1. Scenario 1: I would like to import the data into a firebird table and create the fields dynamically.
   
2. Scenario 2: And in some situations I would just like to populate a ListView with all the data in the Excel.

3. Do you have example of how to work with the TAdoConnection? Is this a db aware component?
0
 
LVL 28

Accepted Solution

by:
2266180 earned 125 total points
ID: 17041181
3)

TAdoConnection is used to connect to different DBs so yes, we can say that it's db aware.

here is a pretty good tutorial on how to get the data out of excel http://delphi.about.com/od/database/l/aa090903a.htm

1) I never worked with firebird but I guess it's the same thing. after you get the table out of excel it's only a matter of iterating through the rows and adding each one to the db. Using ADO in both connections, you might be able to also do a direct table-table copy using ADOTable.Clone method

2) for this you will have to manually iterate through the dataset from excel
0
 

Author Comment

by:Marius0188
ID: 17041257
How can I convert the Excel file to a CSV format wherafter I can the iterate through the data?
0
 
LVL 28

Expert Comment

by:2266180
ID: 17041458
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

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…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

895 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

17 Experts available now in Live!

Get 1:1 Help Now