>I am trying to open excel in VFP and create a new worksheet.
>
>I create the object by creating the following object
>
>oexcel=CREATEOBJECT("excel.application")
>
>from this point forward I do not know how to create a new sheet.
>
>when I type in ?oexcel.activesheet it returns "Null" so I guess I have to
>create a new sheet before I can reference the active sheet property
>
>any ideas ?
>
I believe you are correct. You'll have to do something like this:
ows = oexcel.Worksheets.Add
The Excel application has lots of methods and properties. "Microsoft Office Automation with Visual Foxpro" by Tamar Granor and Della Martin, put out by Hentzenwerke Publishing, is a good starting place for working with it.
Dan LeClair
www.cyberwombat.comSET RANT ON - The Wombat BlogLife isn’t a morality contest and purity makes a poor shield. - J. Peter MulhernDisclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.