May 11, 2005, 10:08 AM
Cyril JoyOutput to multiple excel sheets.
Hello All,
If I have a procedure containing multiple tables, is it possible to output each table into a seperate tab or sheet in excel?
The same question is asked in Dec2003 and I just want to know if this feature is available with any latest versions(version5.3.3)?
May 11, 2005, 12:31 PM
<JG>the following is an example. The stylesheet code names the sheets.
If you have more the 2 the the EXL2K CLOSE goes on the last one.
TABLE FILE CAR
PRINT CAR MODEL SEATS
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET STYLE *
type=report, titletext='REPORT 1', $
ENDSTYLE
END
-RUN
TABLE FILE CAR
PRINT CAR MODEL SEATS
BY COUNTRY
BY MODEL
ON TABLE PCHOLD FORMAT EXL2K CLOSE
ON TABLE SET STYLE *
type=report, titletext='REPORT 2', $
ENDSTYLE
END
-RUN
May 11, 2005, 12:31 PM
GoldyHi Joy,
I think following code is helpful for you,But for that you have to use Office XP or higher version, it's not support in Office 2000.
SET PAGE-NUM=OFF
TABLE FILE CAR
HEADING
"Sales Report"
" "
PRINT RCOST
BY COUNTRY
ON TABLE SET STYLE *
type=report, titletext='Sales', $
type=heading, size=18, $
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
TABLE FILE CENTFIN
HEADING
"Financial Report"
" "
SUM
VALUE
BY
ITEM
BY
YEAR
ON TABLE SET STYLE *
type=report, titletext='Financial', $
type=heading, size=18, $
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
TABLE FILE EMPLOYEE
PRINT
LAST_NAME
CURR_SAL
HIRE_DATE
BY
DEPARTMENT
ON TABLE SET STYLE *
type=report, titletext='Employee', $
type=heading, size=18, $
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END
Thanks,
Goldy
May 11, 2005, 01:33 PM
Cyril JoyThanks a lot JG and Goldy.
It worked great with Excel 2003.
I have one more question, can we do the same with PIVOT table?
ie, Having multiple pivots in different sheets?
OPEN and CLOSE in EXL2K PIVOT?
Any ideas?
May 11, 2005, 01:55 PM
<JG>Yes it works just the same except the syntax is
ON TABLE PCHOLD FORMAT EXL2K OPEN PIVOT
and
ON TABLE PCHOLD FORMAT EXL2K CLOSE PIVOT
The only restriction on pivot tables is that you can not use the NOBREAK option
It's all documented in the Creating Reports With WebFOCUS Language manual