Solved

Importing XLS files

Posted on 2006-07-05
5
488 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

Industry Leaders: 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

691 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