I see that I can use
e.CurrentWorksheet.PrintOptions.Header = My.Settings.EventName + vbTab + My.Settings.EntryListTitle + vbTab + DateTime.Now.ToString("yyyy-M-d")
to set a print header on a worksheet.
Excel, however, appears to offer multiple header locations
With ActiveSheet.PageSetup
.LeftHeader = "" .CenterHeader = "Page Title" .RightHeader = "" .LeftFooter = "Footer Left" .CenterFooter = "" .RightFooter = "Page &P Of &N"
End With
Can these be set when exporting to Excel from an UltraWinGrid? (and I hope I don't have to open Application.Excel and do it)
Thanks in advance ...
Hi Scott
You can use special character formatting when setting the header and footer string. I am attaching a sample application for your reference.
You should be able to achieve your format using the following:
e.CurrentWorksheet.PrintOptions.Header = "&L &CPage Title&R "
e.CurrentWorksheet.PrintOptions.Footer = "&LFooter Left&C &RPage &P Of &N"
For more formatting options and special characters, take a look at this help topic: http://help.infragistics.com/NetAdvantage/WinForms/?page=Infragistics4.Documents.Excel.v13.1~Infragistics.Documents.Excel.PrintOptions~Footer.html
Let me know how this works for you.
Thanks
Ammar Zuriki
Senior Manager
NetAdvantage for Windows Forms
NUCLiOS – INFRAGISTICS iOS controls
TestAdvantage for Windows Forms, HP, IBM
TestAdvantage for WPF (HP)
Hi Scott,
I hope you had a chance to try the solution I sent. Do you have any further questions about this case?
Regards,
If you don't have any more question around this case, may I close the case?
Ammar
By all means, go ahead.
Thanks!