Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error on setting page to excel format
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00795094
Message ID:
00795150
Vues:
26
Hi,

Your code is correct but the only thing you are doing wrong is using the constants which are not defined in the Visual Foxpro.
Actually xlPortrait is having the value 1 and xlPaperFanfoldUS is having a value 39. So, if you run your code as following, it will not give you any problem.
--------------------------------------------------------
tmpsheet = GetObject('','excel.application')
XLApp = tmpsheet.application
XLApp.Visible = .t.
XLApp.WorkBooks.Add()
XLSheet = XLApp.ActiveSheet
* Setting Page setup degan LETTER 8 1/2 X 11 inch LANDSCAPE *
With xlsheet.PageSetup
.LeftMargin = xlapp.InchesToPoints(0.0)
.RightMargin = xlapp.InchesToPoints(0)
.TopMargin = xlapp.InchesToPoints(0.25)
.BottomMargin = xlapp.InchesToPoints(0.25)
.Orientation = 1
.PaperSize = 39
EndWith
-------------------------------------------------------


---
Raj
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform