<< Click to Display Table of Contents >> Excel sheets |
Multiple sheets in Excel workbook.
To create a new Excel sheet, simply close the current one by </USE> and start a new array.
The SHEET name must be put anywhere in the current display loop with a <XLS:SHEET=xxxxxxxxx> tag.
{ xprint.i }
OUTPUT TO c:\temp\demo.xpr PAGED PAGE-SIZE 60.
PUT CONTROL '<preview>'.
FOR EACH customer NO-LOCK BY cust-num:
DISP cust-num LABEL '#num' NAME label 'cust name' city LABEL 'Cust city' WITH STREAM-IO WIDTH 512.
END.
PUT UNFORMATTED "<XLS:SHEET=By num></USE>".
FOR EACH customer NO-LOCK BY NAME:
DISP cust-num LABEL '#num' NAME label 'cust name' city LABEL 'Cust city' WITH STREAM-IO WIDTH 512.
END.
PUT UNFORMATTED "<XLS:SHEET=By Name></USE>".
FOR EACH customer NO-LOCK BY city BY NAME:
DISP cust-num LABEL '#num' NAME label 'cust name' city LABEL 'Cust city' WITH STREAM-IO WIDTH 512.
END.
PUT UNFORMATTED "<XLS:SHEET=By City></USE>".
OUTPUT CLOSE.
RUN printfile('c:/temp/demo.xpr').