| View previous topic :: View next topic |
| Author |
Message |
DeMoNHeaD Guest
|
Posted: Tue Jul 23, 2002 12:00 pm Post subject: MS Excel... Revisisted |
|
|
| Thanx for the DDE thing in my previous question. It works great. Now i have another question. How do i get all the sheets name from ms excel files? I've rename all the sheet and now it contains more than 50 sheet... Any way to do this??? |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jul 23, 2002 12:43 pm Post subject: |
|
|
One thing I know for sure, use @DDEITEM()
If you want to get something out of R1C1 use this:
SHELL OPEN,C:\DOCUMENTS\EXCELFILE.XLS
DDE LINK,excel,Sheet1
INFO @DDEITEM(r1c1)
DDE TERMINATE |
|
| Back to top |
|
 |
Que Valued Newbie

Joined: 25 Aug 2001 Posts: 38 Location: Newaygo, MICH
|
Posted: Tue Jul 23, 2002 8:48 pm Post subject: |
|
|
Forgive the lame output via info boxes... the following script demonstrates the DDE topics available in Excel. Looking at the code and the output should clear up how to access the list of worksheets within a given workbook. How you parse the output into a useable format is up to you.
Please run Excel before running this script. If you don't It will happily run it's course and report nothing Hope this helps.
| Code: |
Title Excel DDE Info
DIALOG CREATE,Excel DDE Info,-1,0,264,47
DIALOG ADD,BUTTON,BUTTON2,10,10,100,24,Run
DIALOG ADD,BUTTON,BUTTON3,10,160,100,24,Exit
DIALOG SHOW
:Evloop
wait event
goto @event()
:BUTTON2BUTTON
DDE LINK,excel,system
%S = @ddeitem(SysItems)
REM THIS SECOND LINE IS THE ONE YOU'LL BE INTERESTED IN
%T = @ddeitem(topics)
%U = @ddeitem(Status)
%v = @ddeitem(Formats)
%w = @ddeitem(Selection)
%x = @ddeitem(Protocols)
%y = @ddeitem(EditEnvItems)
INFO DDE SysItems supported by Excel@CR()%s
INFO DDE Topics supported by Excel@CR()%t
INFO DDE Status of Excel@CR()%u
INFO DDE Formats supported by Excel@CR()%v
INFO DDE Selection in Excel@CR()%w
INFO DDE Protocols supported by Excel@CR()%x
INFO DDE EditEnvItems supported by Excel@CR()%y
DDE TERMINATE
goto evloop
:BUTTON3BUTTON
:Close
exit
|
_________________ Que |
|
| 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 You can attach files in this forum You can download files in this forum
|
|