Solved

Importing XLS files

Posted on 2006-07-05
5
487 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
[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
  • 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

Technology Partners: 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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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