Page 1 of 1

Print excel directly

Posted: Wed Nov 08, 2017 6:13 pm
by MaxChan
Hi,

Is there a way to print the sheet of TXLSSpreadSheet direct to printer?

Thank you very much!

Re: Print excel directly

Posted: Mon Nov 13, 2017 7:51 am
by larsa
Hello

Here is a sample:

Code: Select all

uses XLSBookPrint2;

var
  Print: TXLSBookPrint;
begin
  Print := TXLSBookPrint.Create(Nil);
  try
    Print.XSS := XSS;

    Print.FirstPage := 0;
    Print.LastPage := 2;

    Print.Print;
  finally
    Print.Free;
  end;
end;