How to set BuiltInName to bnPrintTitles in Version 5?

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
Claude
Posts: 4
Joined: Thu Mar 17, 2016 1:20 pm

How to set BuiltInName to bnPrintTitles in Version 5?

Post by Claude »

I fail to migrate this code:

Code: Select all

    with xlw2.InternalNames.Add do
    begin
      BuiltInName := bnPrintTitles;
      Definition := 'Sheet4!$A$3:$IV$3';
    end;
I don't know what it does. What did this do in Version 4? How can bnPrintTitles be used in Version 5?

Claude
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: How to set BuiltInName to bnPrintTitles in Version 5?

Post by larsa »

Hello

Please study the NamedCells sample.
Lars Arvidsson, Axolot Data
Claude
Posts: 4
Joined: Thu Mar 17, 2016 1:20 pm

Re: How to set BuiltInName to bnPrintTitles in Version 5?

Post by Claude »

larsa wrote:Please study the NamedCells sample.
But I don't know what BuiltInName does. Is there a documentation of what it does in version 4?
KenWhite
Posts: 13
Joined: Mon Jan 03, 2005 8:23 pm
Contact:

Re: How to set BuiltInName to bnPrintTitles in Version 5?

Post by KenWhite »

What you're asking is now done with the PrintSettings.

Code: Select all

var
  Col1, Col2, Row1, Row2: Integer;
begin
  AreaStrToColRow('$A$1:$IV$10', Col1, Col2, Row1, Row2);
  Sheet.PrintSettings.PrintTitles(Col1, Col2, Row1, Row2);
end;
Ken
Post Reply