Board index » delphi » Compare and edit two Excel worksheets

Compare and edit two Excel worksheets

Hello,

I use normally dBase Tables for my database needs, but in this case it would
be easier to work with two Excel worksheets directly from Delphi.
There are two systems. One PC with Excel and also a really big system called
SAP - covering several countries by it's network.
The single standalone PC with Excel is used to manage a single warehouse
storage, with all the details needed to save time when counting the stock
and so on.
The PC's Excel worksheet helds the data for this warehouse storage, with
item numbers as ID's. The operator of the stock will then add storage
location etc to be able to get the counting list following the items
location. The big system do not have this feature. It's only able to manage
a item number- sorted edit form for count input.

Therefore I need to export the counting list from SAP to a Excel worksheet
and then by a Delphi program compare this worksheet with the stand alone
PC's worksheet to be sure that they are still equal. (The store is counted
every month)
If there have been changes in the SAP counting list, rows deleted or added,
my Delphi program have to detect this and automatically make them equal, by
adding or deleting rows in the second worksheet. They have to be equal
because the file coming back from the warehouse stock is to be registrated
in the SAP system sorted by item numbers.

I don't want to convert the sheets to dBase tables every month, so how do I
work with Excel directly from Delphi?

:)
Kai Inge

 

Re:Compare and edit two Excel worksheets


Quote
Kai Inge Buseth wrote:

> I don't want to convert the sheets to dBase tables every month, so how do I
> work with Excel directly from Delphi?

If you have D6, there's a bunch of Excel and Word automation components
on the palette.
They probably are able to connect to Excel/Word applications, and
use and command them as servers. I have not yet studied what can
they really do:(

Here are some other links that may be for help
http://www.djpate.freeserve.co.uk/Automation.htm
http://www.axolot.com/components/index.htm

Markku Nevalainen

Re:Compare and edit two Excel worksheets


Thanks for the answer.
Unfortenately I forgot to mention that I still use D3 professional.
There are not too many components in that version dealing with excel. :-)

I'll try out the links.

:)
Kai Inge

Markku Nevalainen <m...@iki.fi> skrev i
meldingsnyheter:3CD99D97.4...@iki.fi...

Quote
> Kai Inge Buseth wrote:

> > I don't want to convert the sheets to dBase tables every month, so how
do I
> > work with Excel directly from Delphi?

> If you have D6, there's a bunch of Excel and Word automation components
> on the palette.
> They probably are able to connect to Excel/Word applications, and
> use and command them as servers. I have not yet studied what can
> they really do:(

> Here are some other links that may be for help
> http://www.djpate.freeserve.co.uk/Automation.htm
> http://www.axolot.com/components/index.htm

> Markku Nevalainen

Re:Compare and edit two Excel worksheets


Quote
Kai Inge Buseth wrote:

> Thanks for the answer.
> Unfortenately I forgot to mention that I still use D3 professional.

Gee, now the folks at Borland will cheerfully clap their big,
hairy hands.

Again one new D6 Professional customer coming in.

And if you tell them you are writing code to SAP environment,
they'll sell you the Enterprise version, and a couple of
Midas packages also, no matter what.

---
By the way, I think you can do a lot of the Office Automation
things also with a pure D3 version. It's only linking Delphi
to use the VBA-macros.
And the third party Excel components will run on D3 also.

Markku Nevalainen

Re:Compare and edit two Excel worksheets


Markku Nevalainen <m...@iki.fi> skrev i
meldingsnyheter:3CDAF3E3.4...@iki.fi...

Quote
> Kai Inge Buseth wrote:

> > Thanks for the answer.
> > Unfortenately I forgot to mention that I still use D3 professional.

> Gee, now the folks at Borland will cheerfully clap their big,
> hairy hands.

> Again one new D6 Professional customer coming in.

I have been soo close, when struggling with Access Violations in D3 pro, to
do just that :-)

Quote

> And if you tell them you are writing code to SAP environment,
> they'll sell you the Enterprise version, and a couple of
> Midas packages also, no matter what.

Bj?rge S?ther wrote somewhere that Enterprise is too expencive compared to
D6 pro,
and that the functionality of Enterprise can be achieved from D6 pro with
some add on's
far less expensive than the Enterprise version.
So it has to be the D6 pro  :-)

Quote

> ---
> By the way, I think you can do a lot of the Office Automation
> things also with a pure D3 version. It's only linking Delphi
> to use the VBA-macros.
> And the third party Excel components will run on D3 also.

> Markku Nevalainen

I will consider this, since migrating to a completely new environment, such
as D6 pro, will certainly take some time to handle.
Thanks again for your answer.

:)
Kai Inge

Re:Compare and edit two Excel worksheets


Kai,

check my SMImport suite - there is a component which will load your xls-file
without any installed MS Excel in memory array and you'll iterate thru cells
(rows/columns).

So just load two spreadsheets and compare two arrays...
If you need some more information, contact me privately.

--
With best regards, Mike Shkolnik
E-Mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

Kai Inge Buseth <kibus...@online.no> D???
???Y??:1wyC8.12688$ph2.399...@news4.ulv.nextra.no...

Quote
> Thanks for the answer.
> Unfortenately I forgot to mention that I still use D3 professional.
> There are not too many components in that version dealing with excel. :-)

> I'll try out the links.

> :)
> Kai Inge

> Markku Nevalainen <m...@iki.fi> skrev i
> meldingsnyheter:3CD99D97.4...@iki.fi...
> > Kai Inge Buseth wrote:

> > > I don't want to convert the sheets to dBase tables every month, so how
> do I
> > > work with Excel directly from Delphi?

> > If you have D6, there's a bunch of Excel and Word automation components
> > on the palette.
> > They probably are able to connect to Excel/Word applications, and
> > use and command them as servers. I have not yet studied what can
> > they really do:(

> > Here are some other links that may be for help
> > http://www.djpate.freeserve.co.uk/Automation.htm
> > http://www.axolot.com/components/index.htm

> > Markku Nevalainen

Other Threads