Hi Guys
Im running MSched 7.4.009
I have tried several different ways to write to an excel spreadsheet without success. I have tried VBScript / as well as VBscript inside Macro scheduler. I have also tried several code examples on the forum. I just tried this one which is almost verbatim of what Marcus wrote in his example the compiled macro ran but nothing happened. Here is the code:
ReadFile>utext.txt,File1
Separate>File1,CRLF,Lines
Let>k=7
Repeat>k
Let>CurrentLine=Lines_%k%
DDEPoke>Excel,e:\test.xls:Sheet1,R%k%C1,CurrentLine
Let>k=k+1
Until>k>Lines_Count
Is there a way to write a stand alone script that does not depend on any external servers. Could there be something wrong with the Excel server on my system??
cant get DDEPoke to work
Moderators: JRL, Dorian (MJT support)
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
Thanks for your quick reply
No the spreadsheet is closed - I thought could there be something about the spreadsheet itself so I made a blank one and named it test.xls. The result was the same - the exe ran but nothing happened.
I have an idea can you send me a zip file of your compiled exe so I can rule out software versus possible system problems??
No the spreadsheet is closed - I thought could there be something about the spreadsheet itself so I made a blank one and named it test.xls. The result was the same - the exe ran but nothing happened.
I have an idea can you send me a zip file of your compiled exe so I can rule out software versus possible system problems??
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It needs to be open for DDE to work.MacschedStudent wrote:No the spreadsheet is closed
See:
http://www.mjtnet.com/blog/2007/07/02/m ... xcel-data/
So your script could do:
ExecuteFile>e:\test.xls
WaitWindowOpen>Microsoft Excel*
..
..
DDEPoke>....
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
thanks for the quick reply Marcus - the results were the same the file opened up but nothing was written to it here is my current code:
ExecuteFile>e:\test.xls
WaitWindowOpen>Microsoft Excel*
ReadFile>utext.txt,File1
Separate>File1,CRLF,Lines
Let>k=7
Repeat>k
Let>CurrentLine=Lines_%k%
DDEPoke>Excel,e:\test.xls:Sheet1,B%k%C1,CurrentLine
Let>k=k+1
Until>k>Lines_Count
ExecuteFile>e:\test.xls
WaitWindowOpen>Microsoft Excel*
ReadFile>utext.txt,File1
Separate>File1,CRLF,Lines
Let>k=7
Repeat>k
Let>CurrentLine=Lines_%k%
DDEPoke>Excel,e:\test.xls:Sheet1,B%k%C1,CurrentLine
Let>k=k+1
Until>k>Lines_Count
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It should be:
DDEPoke>Excel,e:\test.xls:Sheet1,R%k%C1,CurrentLine
Row and Column
DDEPoke>Excel,e:\test.xls:Sheet1,R%k%C1,CurrentLine
Row and Column
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact: