Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem inserting date into Excel Sreadsheet
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00809556
Message ID:
00809563
Views:
32
Gregory

Courtesey of Cetin Basoz

Drop a web browser control into an ole container then put code like this into a button's click event.

With thisform.OleControl1
.Navigate2('file://c:\global\mertest.xls')
Do While .ReadyState # 4 && Wait for ready state
EndDo
endwith

oXLS = thisform.OleControl1.object.document
oExcel = oXLS.Application

*lonytd

do merrtestlonytd && this builds a table called mertest with data laid out
&& as I want the cells to look

select mertest
with oExcel.ActiveWorkBook
.WorkSheets('LON YTD').Activate
oExcel.ActiveWorkBook.ActiveSheet.Range("c8").PasteSpecial()
endwith
_Cliptext = "" && Empty clipboard
oExcel.Application.ActiveWorkbook.Save()

Works great - I put this data in a worsheet which has a number of graphs. As the worsheet is populated the graphs show.

Colin
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Reply
Map
View

Click here to load this message in the networking platform