forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


MS Excel. How to?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DeMoNHeaD
Guest





PostPosted: Sat Jun 29, 2002 3:45 am    Post subject: MS Excel. How to? Reply with quote

Anyone know how do i insert a string to MS Excel cell like A17 then G3?? Question
Back to top
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sat Jun 29, 2002 12:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
DeMoNHeaD
Guest





PostPosted: Mon Jul 01, 2002 5:20 am    Post subject: Reply with quote

Sad Any example? I'm still dont understand. Question
Back to top
Que
Valued Newbie


Joined: 25 Aug 2001
Posts: 38
Location: Newaygo, MICH

PostPosted: Thu Jul 11, 2002 3:49 pm    Post subject: Using DDE to Poke data to Excel Reply with quote

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
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Thu Jul 11, 2002 6:57 pm    Post subject: RE: Using DDE to Poke data to Excel Reply with quote

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! Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Que
Valued Newbie


Joined: 25 Aug 2001
Posts: 38
Location: Newaygo, MICH

PostPosted: Fri Jul 12, 2002 1:36 pm    Post subject: Using DDE to Poke data to Excel Reply with quote

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
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Fri Jul 12, 2002 6:24 pm    Post subject: Reply with quote

It also works with Excel 2002.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Sun Jul 14, 2002 4:08 pm    Post subject: Thanks! Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Jul 14, 2002 6:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Thu Sep 16, 2004 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group