excel - Header in Print Preview is different from workbook name -


i have excel workbook (e.g. test.xls). when print this, header on document should name of document.

however , different header when print workbook. pls advise.

thanks!

if want have dynamic value in header or footer of sheets or specific sheet :

  • you need macro updating values or texts
  • in macro use code :

public sub updateheaderfooter()     ' update header sections     activesheet.pagesetup.leftheader = "left header value"     activesheet.pagesetup.centerheader = "center header value"     activesheet.pagesetup.rightheader = "right header value"     ' update footer sections     activesheet.pagesetup.leftfooter = "left footer value"     activesheet.pagesetup.centerfooter = "center footer value"     activesheet.pagesetup.rightfooter = "right footer value" end sub 

above code change header , footer of current sheet, other sheets use sheet variable specify sheet.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -