Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel pagesetup properties very slow
Message
From
10/11/2000 11:22:07
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00440163
Message ID:
00440246
Views:
14
Auke,
I don't believe the problem is with your code, but I'm not sure what else to suggest. Are you running Excel locally? I am also on Excel2000, and I ran the following code in 2-3 seconds:

local oExcel, wkbk, xlsheet

oExcel = createObject("Excel.Application")
oExcel.visible = .t.
oExcel.displayAlerts = .f.

wkbk = oExcel.workbooks.add()

xlSheet = wkbk.activesheet

with xlSheet.pageSetup
.CenterHeader = "Center Header Test"
.LeftHeader = "Left Header Test"
.RightHeader = "Right Header Test"
.LeftFooter = "Left Footer Test"
.CenterFooter = "Center Footer Test"
.RightFooter = "Right Footer Test"
.topMargin = oExcel.inchesToPoints(0)
.headerMargin = oExcel.inchesToPoints(0)
.footerMargin = oExcel.inchesToPoints(0)
.bottomMargin = oExcel.inchesToPoints(0)
.leftMargin = oExcel.inchesToPoints(0)
.rightMargin = oExcel.inchesToPoints(0)
.orientation = 2
endwith

oExcel.quit()

xlSheet = .NULL.
wkbk = .NULL.
oExcel = .NULL.

release xlSheet
release wkbk
release oExcel
Paul A. Busbey
Victoria Insurance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform