Re: ADOtable Excel
From: Bob_M (Stardate10_at_hotmail.com)
Date: 07/01/04
- Previous message: Matt Jacobs: "Re: What causes a 'Parameter Information cannot be derived from SQL statements with sub-select queries' error?"
- Next in thread: Bob_M: "Re: ADOtable Excel"
- Maybe reply: Bob_M: "Re: ADOtable Excel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jun 2004 20:31:29 -0400
That did it! Thanks
"Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
news:40e2c8c7$1@newsgroups.borland.com...
> Try
> ADOTable.TableName := '[Sheet1$]';
>
> //------------------------------------------
> Regards,
> Vassiliev V. V.
> http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> ADO.Net
> http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> MS Jet (Access) and Interbase (through OLEDB)
>
> "Bob_M" <Stardate10@hotmail.com> сообщил/сообщила в новостях следующее:
> news:40e2b847$1@newsgroups.borland.com...
> > Ok I tried this, when I set active to True I get an error stating it
> couold
> > not find object $Sheet1. Thanks Bob
> >
> > ADOTable := TADOTable.create(application);
> > ADOTable.ConnectionString :=
> > 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.xls;Extended
> > Properties=Excel 8.0';
> > try
> > (* Read Section title Data *)
> > ADOTable.TableName := '[$Sheet1]';
> > ADOTable.active := True;
> > finally
> > ADOTable.Free;
> >
> > "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> > news:40e2645f@newsgroups.borland.com...
> > > TableName := '[$Sheet1]'
> > > or
> > > TableName := '[NamedDiapason]' //place diapason name
> > >
> > > Query could be:
> > >
> > > From ***:
> > > Select * from [$Sheet1]
> > >
> > > From named diapason:
> > > Select * from [DiapasonName]
> > >
> > > From range:
> > > Select * from [Sheet1$B5:C10]
> > >
> > >
> > > Cell A1 probably will be column name, B1 will be on the first row etc.
> > >
> > > //------------------------------------------
> > > Regards,
> > > Vassiliev V. V.
> > > http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> > > ADO.Net
> > > http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> > > MS Jet (Access) and Interbase (through OLEDB)
> > >
> > > "Bob_M" <Stardate10@hotmail.com> сообщил/сообщила в новостях
следующее:
> > > news:40e1cc33$1@newsgroups.borland.com...
> > > > Hello All,
> > > >
> > > > I would like to read the a few cells for data from an Excel file.
I
> > have
> > > > done this with ADO and Access but can't get it to work with Excel.
> > Below
> > > is
> > > > my code. How would I get cell A1 from sheet1? Thanks Bob
> > > >
> > > > ADOTable := TADOTable.create(application);
> > > > ADOTable.ConnectionString :=
> > > > 'Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\test.xls;Extended
> > > > Properties=Excel 8.0';
> > > >
> > > > try
> > > > (* Read Section title Data *)
> > > > ADOTable.TableName := '[Sheet1]';
> > > > ADOTable.active := True;
> > > > finally
> > > > ADOTable.Free;
> > > > end;
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Previous message: Matt Jacobs: "Re: What causes a 'Parameter Information cannot be derived from SQL statements with sub-select queries' error?"
- Next in thread: Bob_M: "Re: ADOtable Excel"
- Maybe reply: Bob_M: "Re: ADOtable Excel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]