Board index » delphi » Importing from Excel

Importing from Excel

    Hi!

    Im using MSSQL-2000, developing in Delphi 7, and i need to import data
from Excel files.  Whats the best path to folow?  the best way of do that?

    Once i will create or modificate some keys in my tables...

    thank you

    any help i appreciate

    any doubt about my question, please post or send me a e-mail

--
mARCELO
RM Sistemas Ltda. Brazil
Analista/Programador de Sistemas
Delphi Programmer
http://www.rmlimeira.com.br
marc...@rmlimeira.com.br
MSN: marcelo_lo...@hotmail.com
ICQ: 19168506

 

Re:Importing from Excel


In addition to Bill's suggestions, you can also use a DTS package directly
on the MSSQL server. Very fast, very easy to set up and schedule if need be
(a daily or weekly import for example).

--

Alain

Quote
"Bill Todd" <b...@notthis.dbginc.com> wrote in message

news:s9c82v8ik27e5har55glqdaue5uvq9bhnh@4ax.com...
Quote
> There are three choices.

> 1) Use the Excel ODBC driver.
> 2) Use ADO.
> 3) Open Excel via Automation.

> The following is how to access data using the ODBC driver.

> Create an ODBC DSN that points to the Excel file.

> Excel files will not appear in the TTable.TableName property
> drop-down. Enter the worksheet file name with no extension followed by
> a $ in the TableName property.  You can optionally append a cell
> range.  For exmaple:  projects$A2:J1000

> To read all of the rows in the worksheet when specifying a cell range
> make the ending row number larger than the last possible row.

> If you really want to work with a table name then you can define a
> named region in Excel, then that region will appear in the list of
> tables

> On Tue, 14 Jan 2003 12:09:06 -0200, "mARCELO" <lombi2...@yahoo.com>
> wrote:

> >    Hi!

> >    Im using MSSQL-2000, developing in Delphi 7, and i need to import
data
> >from Excel files.  Whats the best path to folow?  the best way of do
that?

> >    Once i will create or modificate some keys in my tables...

> >    thank you

> >    any help i appreciate

> >    any doubt about my question, please post or send me a e-mail

> --
> Bill (TeamB)
> (TeamB cannot respond to questions received via email)

Re:Importing from Excel


Cool.

--

Alain Quesnel
alainqsanss...@compuserve.com

Quote
"Vassiliev V.V." <n...@vassilievvv.mtu-net.ru> wrote in message

news:3e2521fa@newsgroups.borland.com...
Quote
> On MS SQL it is much easer to use query like:

> Select * Into MyTable from
> OpenDataSource('Microsoft.Jet.OLEDB.4.0',
> 'Data Source=C:\Temp\Test.xls;Extended properties=Excel 8.0')...[Sheet1$]

> Other DBMS can have analogic functions, in Jet it is

> Select * Into MyTable From SourceTable In ....

> ----------------------------------------------------------------
> Regards,
> Viatcheslav V. Vassiliev
> http://www.oledbdirect.com
> The fastest way to access MS SQL Server, MS Jet (MS Access)
> and Interbase (LCPI provider, http://ibp.lcpi.lipetsk.ru) databases.

> "Alain Quesnel" <alainqsanss...@compuserve.com> ????/???? a
?a????
> ????t??: news:3e24c589@newsgroups.borland.com...
> > In addition to Bill's suggestions, you can also use a DTS package
directly
> > on the MSSQL server. Very fast, very easy to set up and schedule if need
> be
> > (a daily or weekly import for example).

> > --

> > Alain

> > "Bill Todd" <b...@notthis.dbginc.com> wrote in message
> > news:s9c82v8ik27e5har55glqdaue5uvq9bhnh@4ax.com...
> > > There are three choices.

> > > 1) Use the Excel ODBC driver.
> > > 2) Use ADO.
> > > 3) Open Excel via Automation.

> > > The following is how to access data using the ODBC driver.

> > > Create an ODBC DSN that points to the Excel file.

> > > Excel files will not appear in the TTable.TableName property
> > > drop-down. Enter the worksheet file name with no extension followed by
> > > a $ in the TableName property.  You can optionally append a cell
> > > range.  For exmaple:  projects$A2:J1000

> > > To read all of the rows in the worksheet when specifying a cell range
> > > make the ending row number larger than the last possible row.

> > > If you really want to work with a table name then you can define a
> > > named region in Excel, then that region will appear in the list of
> > > tables

> > > On Tue, 14 Jan 2003 12:09:06 -0200, "mARCELO" <lombi2...@yahoo.com>
> > > wrote:

> > > >    Hi!

> > > >    Im using MSSQL-2000, developing in Delphi 7, and i need to
import
> > data
> > > >from Excel files.  Whats the best path to folow?  the best way of do
> > that?

> > > >    Once i will create or modificate some keys in my tables...

> > > >    thank you

> > > >    any help i appreciate

> > > >    any doubt about my question, please post or send me a e-mail

> > > --
> > > Bill (TeamB)
> > > (TeamB cannot respond to questions received via email)

Other Threads