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
Solved

Importing XLS files

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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