Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Freeze a row in Excel
Message
From
08/05/2002 14:21:39
 
 
To
08/05/2002 12:42:48
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00654058
Message ID:
00654153
Views:
14
>Fred,
>Try the following:
>
>oXLS = CREATEOBJECT("excel.application")
>
>oXLS.WorkBooks.Add()
>oSheet = oXLS.ActiveSheet
>
>*-- add some data
>FOR lnRow = 1 TO 100
>   FOR lnCol = 1 TO 5
>      oSheet.Cells(lnRow,lnCol).Value = "Cell(" + ALLTRIM(STR(lnRow))+","+ALLTRIM(STR(lnCol))+")"
>   ENDFOR &&* lnCol = 1 TO 5
>ENDFOR &&* lnRow = 1 TO 100
>
>*-- select the row below the split. In the following case, only
>*-- row 1 will be frozen.
>oSheet.Range("A2").Select  && Adjust
>oXls.ActiveWindow.FreezePanes = .T.
>
>oXLS.visible = .t.
>
>
>HTH
>>Does anyone know how to freeze a row (or range of rows) in an Excel Spread sheet from ole automation?
>>
>>Thanx


Forgot the Select. That's why I could not get it to work.

Thanx.
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Previous
Reply
Map
View

Click here to load this message in the networking platform