Page 1 of 1

Footer problem

Posted: Wed Apr 09, 2014 7:49 am
by markl
Hello!

I use XLSReadWriteII 5.20.22 Trial in DelphiXE2 and have some problems with footer. Footer is not saved after an execution of this example:

Code: Select all

  XLS.Clear;
  XLS.Version := xvExcel97;

  for i := 1 to 256 do
    XLS[0].AsString[1,i] := 'Hello, world '+IntToStr(i);

  XLS[0].PrintSettings.HeaderFooter.OddFooter := '&R&5 Test footer'+#13+'footer second line';

  XLS[0].CalcDimensions;

  XLS.SaveToFile('123.xls');


If XLS.Version is xvExcel2007 all works correctly. Is it trial limitation or bug?

Re: Footer problem

Posted: Wed Apr 09, 2014 9:16 am
by larsa
Hello

You can't use OddFooter/EvenFooter when writing Excel 97 files as it's not available in these files. Use FirstFooter instead.

Re: Footer problem

Posted: Wed Apr 09, 2014 10:16 am
by markl
Thank you, it works.