Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem inserting date into Excel Sreadsheet
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00809556
Message ID:
00809563
Vues:
31
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform