Footer problem

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

Footer problem

Post 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?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Footer problem

Post 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.
Lars Arvidsson, Axolot Data
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

Re: Footer problem

Post by markl »

Thank you, it works.
Post Reply