| View previous topic :: View next topic |
| Author |
Message |
DeMoNHeaD Guest
|
Posted: Sat Jun 29, 2002 3:45 am Post subject: MS Excel. How to? |
|
|
Anyone know how do i insert a string to MS Excel cell like A17 then G3??  |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Jun 29, 2002 12:23 pm Post subject: |
|
|
This should be possible using MIDISA's VDSODBC DLL. It may also be possible
using my VDSDB part of the VDSDLL 3 but this hasn't been successful for me yet.
Alternatively you may consider trying to figure a way using DDE.
Tommy |
|
| Back to top |
|
 |
DeMoNHeaD Guest
|
Posted: Mon Jul 01, 2002 5:20 am Post subject: |
|
|
Any example? I'm still dont understand.  |
|
| Back to top |
|
 |
Que Valued Newbie

Joined: 25 Aug 2001 Posts: 38 Location: Newaygo, MICH
|
Posted: Thu Jul 11, 2002 3:49 pm Post subject: Using DDE to Poke data to Excel |
|
|
Dispensing with the niceties of an actual working program, you'll need to following lines of code to poke data to Excel.
shell open,c:\documents\Excelfile.xls
DDE LINK,excel,Sheet1
DDE POKE,r1c1,text
DDE TERMINATE
Supply your own file name including path
sheet1 should reflect your actual sheet tab name.
r1c1 = row and column number of cell to poke data to. _________________ Que |
|
| Back to top |
|
 |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Thu Jul 11, 2002 6:57 pm Post subject: RE: Using DDE to Poke data to Excel |
|
|
I played around with that and could not get anything to work -- does someone have some working code for poking Excel? I had not thought about this for excel until I read this post -- now I have a NEED for it!  |
|
| Back to top |
|
 |
Que Valued Newbie

Joined: 25 Aug 2001 Posts: 38 Location: Newaygo, MICH
|
Posted: Fri Jul 12, 2002 1:36 pm Post subject: Using DDE to Poke data to Excel |
|
|
I threw together the following which works with MSExcel 97 SR2:
| Code: |
Title ExcelDDE
DIALOG CREATE,ExcelDDE,-1,0,264,147
DIALOG ADD,STYLE,STYLE1,,8,,BACKGROUND,BLACK
DIALOG ADD,STYLE,STYLE2,,9,,BACKGROUND,Red
DIALOG ADD,TEXT,TEXT1,18,10,66,13,File Name :,,,style2,click
DIALOG ADD,TEXT,TEXT2,38,10,66,13,Sheet Name :
DIALOG ADD,TEXT,TEXT3,58,10,66,13,Cell Ref :
DIALOG ADD,TEXT,TEXT4,78,10,66,13,Poke Text :
DIALOG ADD,EDIT,EDIT1,16,76,180,19,,READONLY,STYLE1
DIALOG ADD,EDIT,EDIT2,36,76,180,19,Sheet1
DIALOG ADD,EDIT,EDIT3,56,76,180,19,R1C1
DIALOG ADD,EDIT,EDIT4,76,76,180,19,Hello Excel
DIALOG ADD,BUTTON,BUTTON2,102,10,100,24,Poke Data
DIALOG ADD,BUTTON,BUTTON3,102,160,100,24,Exit
dialog add,status,sb1
DIALOG SHOW
directory change,@path(%0)
dialog set,sb1,Click Filename Label to select a file.
:Evloop
wait event
goto @event()
:BUTTON2BUTTON
DDE LINK,excel,@dlgtext(edit2)
if @ok()
dialog set,sb1,Connected to @name(%%getfile) : @dlgtext(edit2)
else
dialog set,sb1,Failed
goto evloop
end
if @not(@null(@dlgtext(edit3)))
if @not(@null(@dlgtext(edit4)))
DDE POKE,@dlgtext(edit3),@dlgtext(edit4)
end
end
goto evloop
:text1click
%%getfile = @filedlg("Excel file (*.xls)|*.xls",Open file)
dialog set,edit1,@name(%%getfile)
if @not(@ok())
info Select an Excel File to Poke data to.
goto evloop
end
shell open,%%getfile
window position,microsoft excel,0,0,800,300
goto evloop
:BUTTON3BUTTON
:Close
DDE TERMINATE
exit
|
_________________ Que |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Fri Jul 12, 2002 6:24 pm Post subject: |
|
|
It also works with Excel 2002. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
MarkTrubo Contributor


Joined: 27 May 2001 Posts: 148 Location: Long Island, NY
|
Posted: Sun Jul 14, 2002 4:08 pm Post subject: Thanks! |
|
|
| I have written hundreds of VDS programs since version 2, but the DDE stuff got by me. Thanks! The example worked awesome and I will integrate into my needs. Another question, is it possible to poke an excel file that is not openned or is DDE only possible if it is running? |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Jul 14, 2002 6:01 pm Post subject: |
|
|
DDE is a sort of advanced version of the WINDOW SEND command, so you'll always need a opened window...
Maybe you can minimize Excel, and remove it from the taskbar??? |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Thu Sep 16, 2004 10:28 am Post subject: |
|
|
Hi,
does somebody know where to get vdsodbc.dll ? Seems not to be listed on vdsworld anymore.
I am trying to get all existing fieldnames in a access table. vdsdb seems not to have a function for this and access seems not have have this in sql statements.
Bye, Fabian |
|
| 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
|
|