Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using EXCEL 2007 problem
Message
From
17/05/2012 11:14:12
 
 
To
17/05/2012 10:56:30
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01543746
Message ID:
01543754
Views:
70
Likes (1)
>loExcel = CREATEOBJECT("Excel.Application")
>....
>loExcel.Sheets(1).Rows(lnRow).RowHeight = 17
>loExcel.Sheets(1).Rows(lnRow).VerticalAlignment = -4108
>...
>loExcel.Sheets(1).Cells(lnRow,1).NumberFormat = "@"
>loExcel.Sheets(1).Cells(lnRow,1).VALUE = ALLTRIM(GROUPITEMS.Item)
>............
>loExcel.Sheets(1).Cells(lnRow,10).NumberFormat = "@"
>loExcel.Sheets(1).Cells(lnRow,10).HorizontalAlignment = -4108
>loExcel.Sheets(1).Cells(lnRow,10).VALUE = ALLTRIM(FOODITEMS.Width)
>................................

Helen,

using the full reference to the cell each time is (a lot) slower than - see below
sheetobj = m.loExcel.Sheets(1)
with m.sheetobj.Cells(m.lnRow, 10)
	.NumberFormat = "@"
	.HorizontalAlignment = -4108
	.VALUE = ALLTRIM(FOODITEMS.Width)
endwith
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform