Hi!
How can I restrict printing area? e.g. I have filled 10 colums on my grid, and I need print only first 8 columns.
restrict printing area
Hello
You set the print are with IntrnalNames. Example:
Lars Arvidsson
You set the print are with IntrnalNames. Example:
Code: Select all
with XLS.InternalNames.Add do begin
BuiltInName := bnPrintArea;
Definition := 'Sheet1!$D$4:$G$10';
end;
Hello!
Why at opening a file there is a mistake?
Why at opening a file there is a mistake?
Code: Select all
xls.Filename := 'c:\1.xls';
xls.Sheets[0].Name := 'A';
with xls.InternalNames.Add do
begin
BuiltInName := bnPrintArea;
Definition := 'A!$D$4:$G$10';
end;
xls.Sheets.Add;
xls.Sheets[1].Name := 'S';
with xls.InternalNames.Add do
begin
BuiltInName := bnPrintArea;
Definition := 'S!$D$4:$G$10';
end;
xls.Sheets.Add;
xls.Sheets[1].Name := 'D';
with xls.InternalNames.Add do
begin
BuiltInName := bnPrintArea;
Definition := 'D!$D$4:$G$10';
end;