Excel PageSetup

Add-in Express™ Support Service
That's what is more important than anything else

Excel PageSetup
Unable to access ActiveSheet.PageSetup 
Allan McPherson




Posts: 2
Joined: 2006-06-09
How should I access the Excel PageSetup with Add-In Express (Delphi 2005). ExcelApp.ActiveSheet under Add-In Express appears to have a limited number of properties compared to the equivalent under VBA

e.g. in VBA, just use Application.ActiveSheet.PageSetup.LeftFooter to obtain the text in the left footer
Posted 09 Jun, 2006 16:30:38 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Allan,

See the code below:

var
  ISheet: _Worksheet;
begin
  ISheet := nil;
  if Assigned(ExcelApp.ActiveSheet) then
    ExcelApp.ActiveSheet.QueryInterface(IID__Worksheet, ISheet);
  if Assigned(ISheet) then
    try
      ISheet.PageSetup.LeftFooter;
    finally
      ISheet := nil;
    end;
end;
Posted 12 Jun, 2006 03:36:28 Top
Allan McPherson




Posts: 2
Joined: 2006-06-09
Ah yes, interfaces ?Â?Ð??

Thank you - works perfectly!
Posted 12 Jun, 2006 22:38:16 Top