Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to edit a excel file in form of VFP?
Message
From
04/08/2003 01:52:03
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
03/08/2003 23:06:29
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00816370
Message ID:
00816379
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
Here's a working example. Substitute your "DocumentFile" name, run the code, and then double-click on the Sheet image in the form in order to edit it.
o1 = CREATEOBJECT( "MyForm" )
o1.Show()

READ EVENTS

DEFINE CLASS MyForm AS Form
   WindowState = 2
PROCEDURE Init
   THISFORM.AddObject("Excel", "oleExcelObject")
   THISFORM.Excel.Visible = .T.
PROCEDURE Activate()   
   THISFORM.Resize()
PROCEDURE Resize   
   THISFORM.Excel.Height = THISFORM.Height
   THISFORM.Excel.Width = THISFORM.Width
PROCEDURE QueryUnload
   CLEAR EVENTS   
ENDDEFINE

DEFINE CLASS oleExcelObject as OLEControl
   OleClass = "Excel.Sheet" 
   DocumentFile = "d:\MYBIZ\info request.xls" 
ENDDEFINE 
>Hi everybody!
>I would like to edit a excel file in the windows of foxpro form ( not in MS Excel window ). It similar to create an OLE in VFP form with “create new ”+”Microsoft Excel worksheet” option , but documentfile property is specific file.
>
>Please help me.
>Thanks
>Canh
Previous
Reply
Map
View

Click here to load this message in the networking platform