Focal Point
Excel Style Sheet (Multiple Sheet)

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9421014002

December 08, 2006, 02:07 AM
<Antony Gubert>
Excel Style Sheet (Multiple Sheet)
Hi,

I have an Excel style sheet template which has multiple sheets. I need to execute around 10 procedures and export data into this StyleSheet. To do that I have created a procedure in which I am doing the following

-INCLUDE CAR1
-RUN
-INCLUDE CAR2
-RUN
-INCLUDE CAR3
-RUN
-INCLUDE CAR4
-RUN
-EXIT

But when I execute the above procedure, WebFOCUS is just executing the first procedure i.e CAR1 and not the remaining.

Please let me know how to solve this issue. The following are the sample code of the called procedures.

--* File CAR1.fex
TABLE FILE CAR
PRINT
COUNTRY
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'test' SHEETNUMBER 1
END

-* File CAR2.fex
TABLE FILE CAR
PRINT
CAR
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'test' SHEETNUMBER 2
END

And so on…….
December 08, 2006, 08:27 AM
Pam Kratt
I believe you need an open statement on your first ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'test' SHEETNUMBER 1
and you will need a close statement on your last on table pchold you call. I never have used the template and sheetnumber feature, so I'm not sure it it matters where you put the open and close.

I usually have ON TABLE PCHOLD FORMAT EXL2K OPEN
or ON TABLE PCHOLD FORMAT EXL2K CLOSE.
Hope this helps.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
December 08, 2006, 09:27 AM
Trav
The way we do it is everything is an ON TABLE HOLD until the very last sheet -- and that's a PCHOLD.

Example:

ON TABLE HOLD AS COMPARISON FORMAT EXL2K TEMPLATE 'test' SHEETNUMBER 1
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'COMPARISON' SHEETNUMBER 2


If you had more than 2 sheets, I'm not sure if you'd have to have different hold names or not... The basic idea though is that you're holding it out and building upon that each time though.

Hope that helps.



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
December 08, 2006, 12:46 PM
Commando Dave
There's always more than one way to skin a cat but one way is the OPEN and CLOSE commands. For example:
(Where &FMT = PDF or EXL2K)

FIRST TABLE...

ON TABLE PCHOLD FORMAT &FMT OPEN
END

MIDDLE TABLES...

ON TABLE PCHOLD FORMAT &FMT
END

LAST TABLE...

ON TABLE PCHOLD FORMAT &FMT CLOSE
END


Your code might be something like this...


-INCLUDE CAR1
-RUN
-INCLUDE CAR2
-RUN
-INCLUDE CAR3
-RUN
-INCLUDE CAR4
-RUN
-EXIT

--* File CAR1.fex
TABLE FILE CAR
PRINT
COUNTRY
ON TABLE PCHOLD FORMAT EXL2K OPEN TEMPLATE 'test' SHEETNUMBER 1
END

-* File CAR2.fex
TABLE FILE CAR
PRINT
CAR
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'test' SHEETNUMBER 2
END

-* File CAR3.fex
TABLE FILE CAR
PRINT
CAR
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'test' SHEETNUMBER 3
END

-* File CAR4.fex
TABLE FILE CAR
PRINT
CAR
ON TABLE PCHOLD FORMAT EXL2K CLOSE TEMPLATE 'test' SHEETNUMBER 4
END


The 4 sheets will appear as tabs in excel. The only "nasty" thing I've found is that the 2nd, 3rd, 4th, etc sheets will be in tabs called "recovered_sheet1", "recovered_sheet2", etc in excel rather than the report title. The report title can be set by TITLETEXT='Nice Title' in the stylesheet but only the fist tab (the result of the first table request) will have the "Nice Title".


-Commando Dave
December 11, 2006, 01:53 AM
<Antony Gubert>
Hi Commando Dave,

Thanks for your help. But i am getting the following error message.

Unknown error occurred.
Agent on reporting server EDASERVE may have crashed.
Please investigate reporting server log.
ERROR:


Any idea about how to solve this issue?

Thanks

Antony Gubert
December 15, 2006, 11:10 AM
Kerry
Hi Antony,

Has this issue been resolved on your side?

I ran some search on Information Builders' online document and came to the understanding that the error message you received is a little generic that it can appear in several different situations. The following online documents may be of interest:

Summary: EXL2K formula: TOC and missing COMPUTE columns crash server

"Agent on reporting server EDASERVE may have crashed"

Maintain: "Unknown error occurred", agent crashed
(Are you using Maintain as well?)

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.