Print excel directly

Questions and answers on how to use XLSSpreadSheet.

Print excel directly

Postby MaxChan » Wed Nov 08, 2017 6:13 pm

Hi,

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

Thank you very much!
MaxChan
 
Posts: 17
Joined: Sat Sep 03, 2016 6:38 am

Re: Print excel directly

Postby larsa » Mon Nov 13, 2017 7:51 am

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;
Lars Arvidsson, Axolot Data
larsa
Site Admin
 
Posts: 615
Joined: Mon Jun 27, 2005 9:30 pm


Return to XLSSpreadSheet

Who is online

Users browsing this forum: No registered users and 1 guest

cron