Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Defining Page Breaks in Excel from VFP
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement