Highlighted
Absent Member.
Absent Member.
190 views

[archive] Setting the Page Number When Exporting Information to Excel

[Migrated content. Thread originally posted on 10 April 2007]

I am exporting data to Excel using the Application, Workbook, Worksheet and Range objects. I am having a problem trying to get the page number to display properly when I print from Excel. Throwing all the information from my program to Excel is fine and I am able to set the LeftHeader, LeftFooter and CenterFooter with the correct information, and I need to set the RightFooter so the Page Number will print out, but I cannot get it to work.

Does anyone have any ideas?

I looked at the Headers and Footers view in Excel and when I click on Custom Footer, it allows me to put "&[Page]" into the Right Section and I tried modifying my worksheet, in my program, using "&[Page]", but when I Export my data to excel and print out the spreadsheet, I get "Page]" where the page number should be.
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] Setting the Page Number When Exporting Information to Excel

modify the section using "&P" and you should get the page number.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.