 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Nelson Chui Guest
|
Posted: Fri Jan 30, 2004 3:18 pm Post subject: How can I retrieve data from an Excel remotely ? |
|
|
HI, any OLE Experts
I do not have experience in using a method, which may be RPC, COM, DCOM
or etc., to call, open and retrieve data from a remote EXCEL file on a
remote PC machine. The meaning of "remote" is treated as another PC in
either LAN or WAN where is installed EXCEL program.
I have a problem as the followings.
PC(A) is installed EXCEL program and some proprietary DLL and Excel
add-in features. ( But, I don't know which DLL is/are installed and its
related information ). And, I want to use a PC(B) running a program
written by Delphi which can call PC(A) to open EXCEL worksheet and
retrieve the EXCEL data from PC(A) to PC(B).
I have read some example and document from Internet about OLE Automation
that is only shown how to open / retrieve EXCEL data within a PC !
Would you give me any example, document, advice and related Web site for
solving my problem ?
THANK YOU VERY MUCH IN ADVANCE FOR ANY REPLY !!!
Regards,
Nelson.
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Fri Jan 30, 2004 10:18 pm Post subject: Re: How can I retrieve data from an Excel remotely ? |
|
|
See a sample:
{initialize the remote MS Excel instance}
xls := CreateRemoteComObject('remote_computer',
StringToGUID('Excel.Application'));
{load file}
xlw := xls.WorkBooks.Open(yourFileName)
{read value from cell}
v := xls.ActiveSheet.Cells[5, 2].Value;
{close MS Excel instance}
xlw.Close;
xlw := UnAssigned;
xls.Quit;
xls := UnAssigned;
where xls, xlw, v: Variant;
and remote_computer is a name for your PC(A)
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
"Nelson Chui" <nelson_chui (AT) yahoo (DOT) com> wrote
| Quote: | HI, any OLE Experts
I do not have experience in using a method, which may be RPC, COM, DCOM
or etc., to call, open and retrieve data from a remote EXCEL file on a
remote PC machine. The meaning of "remote" is treated as another PC in
either LAN or WAN where is installed EXCEL program.
I have a problem as the followings.
PC(A) is installed EXCEL program and some proprietary DLL and Excel
add-in features. ( But, I don't know which DLL is/are installed and its
related information ). And, I want to use a PC(B) running a program
written by Delphi which can call PC(A) to open EXCEL worksheet and
retrieve the EXCEL data from PC(A) to PC(B).
I have read some example and document from Internet about OLE Automation
that is only shown how to open / retrieve EXCEL data within a PC !
Would you give me any example, document, advice and related Web site for
solving my problem ?
THANK YOU VERY MUCH IN ADVANCE FOR ANY REPLY !!!
Regards,
Nelson.
|
|
|
| Back to top |
|
 |
|
|
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
|
|