Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you set an Excel Header?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00189300
Message ID:
00189323
Vues:
10
>I am creating a spreadsheet with the following code:
>
>ExcelObj = CreateObject('Excel.Application')
>ExcelObj.Visible = .T.
>ExcelObj.Workbooks.Add
>ExcelBook = ExcelObj.ActiveWorkbook
>ExcelSheet = ExcelBook.Activesheet
>
>I have no problem filling the spreadsheet, but I am having a hard time finding out how to put in the title of the spreadsheet. In excel, it would be under Page Setup/Custom Header. Can anyone help with the syntax?
>
>Thanks,
>
>Mark

Mark,

WITH ExcelObj.ActiveWorkbook.ActiveSheet.Pagesetup
.LeftHeader = "MyLeftHeader"
.CenterHeader = "MyCenterHeader"
.RightHeader = "MyRightHeader"
ENDWITH

The same goes for footer.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform