Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defining Page Breaks in Excel from VFP
Message
 
À
13/07/2001 09:14:49
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00530184
Message ID:
00530194
Vues:
19
Don't quote me on this but I *THINK* that the range also needs to be an object. Something like oRange = oleExcel.ActiveSheet.Range("U1") and then oleExcel.ActiveSheet.HPageBreaks.Location = oRange (its some time since I did this and somebody has borrowed my Excel VBA book). Hopefully, should point you in the right direction.

>I am creating a report with statistical information in an Excel file from VFP 6 using OLE Automation. I would to set up some Page Breaks within the Excel file, but am having difficulty doing so. Setting up Page Break Preview is fine using:
> oleExcel.ActiveWindow.VIEW = xlPageBreakPreview
> (where oleExcel is the Excel object)
>
>However manipulating Page Breaks is proving difficult giving the syntax Excel uses seems incompatible with VFP. I've tried many varieties, such as:
> oleExcel.ActiveSheet.VPageBreaks(1).Location = RANGE("U1")
> oleExcel.SET(ActiveSheet.HPageBreaks(1).Location) = RANGE("A47")
> oleExcel.ActiveSheet.VPageBreaks(1).DragOff Direction:=xlRight, RegionIndex:=5
> oleExcel.ActiveWindow.SelectedSheets.HPageBreaks.AddBefore=ActiveCell
>
>None of these work. If anyone can suggest ways to handle Page Breaks, I would be most grateful.
>
>
>Steve Smith
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform