Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening excel in form
Message
De
06/06/2003 03:20:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/06/2003 17:59:13
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00796969
Message ID:
00797064
Vues:
13
>I'm trying to open an excel document in a form but I get only as far as specifying the object to open, I have this:
>
>oForm.addobject('oExcel','olecontrol','excel.Application')
>
>oForm.oExcel.WorkBooks.Open('c:\test.xls')
>
>oForm.oExcel.Height = THISFORM.txtContainer.height
>oForm.oExcel.Width = THISFORM.txtContainer.width
>oForm.oExcel.Top = THISFORM.txtContainer.top
>oForm.oExcel.Left = THISFORM.txtContainer.left
>
>oForm.oExcel.Visible = .t.
>oForm.Show
>
>But I still don't see the spreadsheet on the form. What am I missing?
>
>Thanks.

Roy,
You could place a spreadsheet on form and access its application (excel.application) through obj.application. ie: Drag&drop an Olecontrol control on to your form and 'create from file' using your xls.
Insertting a webbrowser control (like FFC _WebBrowser) and navigating to excel file is better.
But to be honest I never suggest neither Excel nor Word in a form.
Check Thread #787305. Though it was for word, procedure is identical for Excel.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform