Excel Header & Footer

gasomma

Member
Hi,

I need to user header & footer (insert sheet, text, page number) in ms excel.
May somebody have some example to show me.

Thanks in advance.

JCA
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I assume the question is, "How do I insert header and footers into a worksheet in an Excel workbook, from the ABL?" It would be helpful if you mentioned your Excel version and your OpenEdge version.
 

mrobles

Member
Hi.
May be this can help you ...
chExcelApplication:ActiveSheet:pageSetup:RightHeader = "Pag &P" + " de " + "&#". /* Page n of n' */
chExcelApplication:ActiveSheet:pageSetup:LeftHeader = "First Line~nSegunda Linea~nHola Pag &P~n &F". /* Text, new lines, page number and Today */
chExcelApplication:ActiveSheet:pageSetup:CenterHeader = "En el Centro~n&G". /* Text and a picture */
chExcelApplication:ActiveSheet:pageSetup:CenterHeaderPicture:FILENAME = SEARCH('mylogo.jpg'). /* The picture */
chExcelApplication:ActiveSheet:pageSetup:HeaderMargin = chExcelApplication:InchesToPoints(0.8). /* New top */
chExcelApplication:ActiveSheet:pageSetup:topMargin = chExcelApplication:InchesToPoints(1.5). /* New data top */
/* Take care with your logo size. If it's big, may ocult the data */
/* For the footer use the same changing Header for Footer */

/* For the header. If you only want repeat some lines then use */
chExcelApplication:ActiveSheet:pageSetup:printTitleRows = '$1:$5'.
/* This repeats the lines 1 to 5 each page */

Bye.
MRobles
 
Top