PrintSettings.RowsOnEachPage

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
charlesWolfe
Posts: 4
Joined: Tue Sep 18, 2007 4:49 pm
Location: Abilene, TX

PrintSettings.RowsOnEachPage

Post by charlesWolfe »

In version 1, to have XLS repeat the row(s) on each printed page,
we would use the command:
XLS.Sheets[0].PrintSettings.RowsOnEachPage := '0:'+IntToStr(XLSCurrRow);

What do we use in version 3?
Charles Wolfe
WolfePak Software
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

Print titles are defined as a name, with the InternalNames property.

Code: Select all

  with XLS.InternalNames.Add do begin
    // A print area is a built in name; that is, there is no name for it.
    BuiltInName := bnPrintTitles;
    // The definition area must be absolute.
    Definition := 'Sheet1!$A$1:$G$15';
Lars Arvidsson
charlesWolfe
Posts: 4
Joined: Tue Sep 18, 2007 4:49 pm
Location: Abilene, TX

Post by charlesWolfe »

added stmt, not working, getting excel error when doing print or preview:
Print Titles must be contiguous and complete rows or columns.
Charles Wolfe
WolfePak Software
charlesWolfe
Posts: 4
Joined: Tue Sep 18, 2007 4:49 pm
Location: Abilene, TX

print rows on each line.

Post by charlesWolfe »

Must specify Sheet1!$A$1:$IV$5
if you are wanting the first 5 rows to be printed.
Must be $A thru $IV
Charles Wolfe
WolfePak Software
Post Reply