Excel Help

Excel Help

Postby cdmmaui » Mon Aug 21, 2006 2:32 am

Hello,

Can someone provide the correct to set the following?

1) Freeze pane
2) Set Header
3) Set Footer

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Carlos Sincuir » Mon Aug 21, 2006 2:43 am

For freeze panel...using TExcelScript:

Code: Select all  Expand view
/*
*  TExcelScript():FreezePanel()
*/
METHOD FreezePanel( cRange )  CLASS TExcelScript

  ::oExcel:Range( cRange ):Select()
  ::oExcel:Application:ActiveWindow:FreezePanes := .T.

RETURN Self


Carlos Sincuir
Carlos Sincuir
 
Posts: 38
Joined: Mon Nov 28, 2005 2:10 pm

Postby cdmmaui » Mon Aug 21, 2006 2:56 am

Hello,

I am using the following code and getting an error.

oAs := oExcel:ActiveSheet()

oAs:FreezePanes := .T.

Any ideas?

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Detlef Hoefner » Mon Aug 21, 2006 6:43 am

cdmmaui,

as Carlos pointed out, you have do do a "select" before.
The freeze command works like in real Excel.
First you have to select a cell and then you can freeze the sheet.

This sample works for me:
Code: Select all  Expand view
   oWin := oExcel:Get( "ActiveWindow" )
   oSheet:Cells( 2, 1 ):Select()
   oWin:Set( "FreezePanes", .t. )

Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests