Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel book imported into sql server through delphi 2006

Status
Not open for further replies.

Stripes1283

Programmer
Jun 13, 2007
28
ZA
Hi there I need to import an excel book into sql server through delphi 2006. How would i go about it, does anyone maybe have a piece of code that i can look at, or know where i can go to look at some examples. I am new at this so would like some help please. Kind regards
 
It depends if you need to do some processing of the data before you import it into SQL.

You can execute T-SQL statements through Delphi as found on these pages if you don't need to do any processing:

Another way is to automate Excel and then you traverse through the rows and columns manually.

A third way would be try the SMImport suite:
Let us know more about what you need to do and I might be able to provide some actual examples.
 
Hey yeah thanks ill definitely go and look at those links.
What I need to do is someone is gonna send me an excel book, only with one sheet of data in the book though. Then there will be like i think say 6 columns with data in the sheet, what needs to happen then is i have to have a table in sql that the data needs to be imported into. The things is the columns in the excel sheet and in sql will always remain the same. However when a new sheet of data is imported from excel,
then the sql table needs to be cleared and the new data must be stored in sql. Furthermore like i said earlier i have to do this with delphi 2006. Any help would be appreciated. Thanks guys.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top