BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Import from Excel - Free Code

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Henry - AR
Guest





PostPosted: Wed Aug 24, 2005 9:42 pm    Post subject: Import from Excel - Free Code Reply with quote



Hi guys
I've to import data from Excel file...
This file usually has lot of sheets, not more than 10 and I would like
to get a code to:

1- Make each sheet to be a TTabSheet in my TPageControl...
2- When I change each Tab, load data from its corresponding excel's sheet #

Can any1 help me ? With some FREE code ?

I use Delphi 5

Thanks a lot in advance.
Back to top
Patrick
Guest





PostPosted: Thu Aug 25, 2005 2:23 pm    Post subject: Re: Import from Excel - Free Code Reply with quote



Quote:
Can any1 help me ?
I posted how to read data from Excel into a recordset in this group,

responding to
"Need to read data from Excel -- where to begin"
You can search the groups for it.



Back to top
Henry - AR
Guest





PostPosted: Mon Aug 29, 2005 6:30 pm    Post subject: Re: Import from Excel - Free Code Reply with quote



Hi Patrick
I found the thread you name, then Tried your code, but could not make it
work, removed the progress form call, tried to find what were the vars
you used like
rsRawData := CoRecordset.Create;
and
FldAttribs := adFldUpdatable+adFldIsNullable+adFldMayBeNull;
but well, i get lot of compilation errors in my DELPHI5

Do you (or any1) know another method ?
I cannot make XlsReadWrite work in Windows XP / Delphi 5 ...

Thanks 4 helping

Patrick wrote:
Quote:
Can any1 help me ?

I posted how to read data from Excel into a recordset in this group,
responding to
"Need to read data from Excel -- where to begin"
You can search the groups for it.



Back to top
Patrick
Guest





PostPosted: Mon Aug 29, 2005 8:54 pm    Post subject: Re: Import from Excel - Free Code Reply with quote

Quote:
I found the thread you name, then Tried your code, but could not make it
work,
See my comments on the recordset code.


Quote:
removed the progress form call
Good, doesn't help or hurt reading the file


Quote:
rsRawData := CoRecordset.Create;
and
FldAttribs := adFldUpdatable+adFldIsNullable+adFldMayBeNull;
but well, i get lot of compilation errors in my DELPHI5
We wrote our own recordset code (D3); I'm sure D5 has something you could

use. I've used the method provided to populate a client dataset, also.

I did not expect the code to compile for you, it is meant as a guideline on
how to interface with Excel using late binding.

Quote:
Do you (or any1) know another method ?
Have you read http://www.djpate.freeserve.co.uk/Automation.htm ?


Quote:
I cannot make XlsReadWrite work in Windows XP / Delphi 5 ...
What is XlsReadWrite?





Back to top
Henry - AR
Guest





PostPosted: Tue Aug 30, 2005 12:27 am    Post subject: Re: Import from Excel - Free Code Reply with quote

Hi

Quote:
Have you read http://www.djpate.freeserve.co.uk/Automation.htm ?
Yes, I visited, but I didn't understand anything


Quote:
What is XlsReadWrite?
http://www.axolot.com/components/xlsrwii20.htm


The thing is that I'm newbie with Delphi, and I'm looking a piece of
code to import from a xls file into my grid, but cannot find a code
which can work in my Delphi5, WinXP, Office 2003

Thanks again for helping... will keep looking


Patrick wrote:
Quote:
I found the thread you name, then Tried your code, but could not make it
work,

See my comments on the recordset code.


removed the progress form call

Good, doesn't help or hurt reading the file


rsRawData := CoRecordset.Create;
and
FldAttribs := adFldUpdatable+adFldIsNullable+adFldMayBeNull;
but well, i get lot of compilation errors in my DELPHI5

We wrote our own recordset code (D3); I'm sure D5 has something you could
use. I've used the method provided to populate a client dataset, also.

I did not expect the code to compile for you, it is meant as a guideline on
how to interface with Excel using late binding.


Do you (or any1) know another method ?

Have you read http://www.djpate.freeserve.co.uk/Automation.htm ?


I cannot make XlsReadWrite work in Windows XP / Delphi 5 ...

What is XlsReadWrite?




Back to top
Mike Shkolnik
Guest





PostPosted: Tue Aug 30, 2005 7:21 am    Post subject: Re: Import from Excel - Free Code Reply with quote

Quote:
The thing is that I'm newbie with Delphi, and I'm looking a piece of
code to import from a xls file into my grid, but cannot find a code
which can work in my Delphi5, WinXP, Office 2003
See the XLSView demo project for SMImport suite:

http://www.scalabium.com/smi

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com



Back to top
Patrick
Guest





PostPosted: Tue Aug 30, 2005 12:50 pm    Post subject: Re: Import from Excel - Free Code Reply with quote

Quote:
The thing is that I'm newbie with Delphi, and I'm looking a piece of
code to import from a xls file into my grid, but cannot find a code
which can work in my Delphi5, WinXP, Office 2003
Most code examples need to be changed/modified to meet specific situations.

You really sound like you just want a component.

Quote:
See the XLSView demo project for SMImport suite:
http://www.scalabium.com/smi
$35 (I'd get the Source version for $50 just in case I needed to tweak the

component) is cheap cheap cheap.



Back to top
Henry - AR
Guest





PostPosted: Wed Aug 31, 2005 2:25 am    Post subject: Re: Import from Excel - Free Code Reply with quote

This is what I was looking for !
Thanks Mike !
Gonna install trial, show the boss, and then will aks his credit card to
buy it
Thanks 4 helping !

Mike Shkolnik wrote:
Quote:
The thing is that I'm newbie with Delphi, and I'm looking a piece of
code to import from a xls file into my grid, but cannot find a code
which can work in my Delphi5, WinXP, Office 2003

See the XLSView demo project for SMImport suite:
http://www.scalabium.com/smi

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.