Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write to Lotus spreadsheet from FoxPro

Status
Not open for further replies.

vmikeydet

Programmer
Oct 22, 2002
4
US
I'm trying to use Windows script hosting from a Visual FoxPro application to write data to a Lotus 123 spreadsheet. I can use the technique to write to a Notepad or MS Word file, but it is not working with either Excel or Lotus. Here is the script I am running in FoxPro:

DECLARE Sleep IN Win32API;
integer dwDelay

oShell = CREATEOBJECT("WScript.Shell")
oShell.run("d:\projects\emc501\admin\errorlog.123")
oShell.AppActivate('1-2-3')
=Sleep(100)
oShell.SendKeys("Test")
oShell = .null.

Instead of writing "test" to the spreadsheet, it is being written to the FoxPro window.

Thanks for any help.

Steve
 
Have you tried making an object of Lotus, like Wordor Excel? I use micorsoft object browser to find the methods and properties of such objects.

Attitude is Everything
 
try posting the vfp3 and up forum...there are lots of good people in there
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top