Focal Point
Excel spreadsheets

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

March 08, 2008, 07:59 PM
Marian
Excel spreadsheets
I'd like to run two different reports but have the output from each one written to a different sheet in one spreadsheet. I can't find a description on how to do this. Any ideas?

We are on WebFOCUS 7.6.1
March 08, 2008, 08:17 PM
Leah
Don't have system up but try this USING CAR FILE

SET COMPOUND = OPEN
TABLE FILE CAR
PRINT MODEL 
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K
END
TABLE FILE CAR
COUNT MODEL
BY COUNTRY
ON TABLE SET COMPOUND CLOSE
ON TABLE PC HOLD FORMAT EXL2K
END  


Basic the same as for compound PDF

The 'ON TABLE SET COMPOUND CLOSE' is how I do it in my environment. If done outside the table request.

SET COMPOUND = CLOSE


Leah
March 10, 2008, 01:07 AM
focuzsambit
TYPE=REPORT, SIZE=9, TITLETEXT='Sheet1', GRID=ON, BORDER=OFF,BACKCOLOR=WHITE, $

if you interested in giving customised names to Sheets...

tks/sam


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
March 10, 2008, 09:08 AM
GinnyJakes
Since you are on 76, why not try using the PDF Layout Painter and set the output format to Excel. The PDF Layout Painter is not just for pdf output but can prepare compound reports for html and excel as well.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 10, 2008, 09:42 AM
Glenda
Here's a simplified example of a multi-tabbed Excel spreadsheet with customized tab names as Sam suggested.

TABLE FILE CAR
PRINT MODEL 
BY COUNTRY
ON TABLE SET STYLE *
TYPE=REPORT,
SIZE=9,
TITLETEXT='Car Detail',
GRID=ON,
BORDER=OFF,
BACKCOLOR=WHITE,
$
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
TABLE FILE CAR
COUNT MODEL
BY COUNTRY
ON TABLE SET STYLE *
TYPE=REPORT,
SIZE=9,
TITLETEXT='Car Summary',
GRID=ON,
BORDER=OFF,
BACKCOLOR=WHITE,
$
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END  


For additional information, try looking up "Creating Excel Compound Reports" in the manual
[U]Creating Reports with WebFOCUS Language[/U]
.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
March 11, 2008, 06:24 AM
Majid Jeddi
Hi Glenda

This is very interesting but I am getting an error running it.
The output is HTML code inside the spreadsheets.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
March 11, 2008, 07:26 AM
GamP
Majid, it may help if you tell us what error message it is that you're getting.
And how do you notice that the code in excel is html? Are the tags and such preent in the cells or what? Please be a bit more specific, that way we can try to help you better.
For what it is worth, I ran Glenda's report and all just came out fine in excel 2003.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 11, 2008, 07:30 AM
focuzsambit
Try This >>

  
SET COMPOUND = OPEN
EX smohanty_fex1
SET COMPOUND = CLOSE
EX smohanty_fex2


-*smohanty_fex1 starts here

TABLE FILE CAR
PRINT
     COUNTRY
     CAR
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Sambit',
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
ENDSTYLE
END


-*smohanty_fex2 starts here
TABLE FILE CAR
PRINT
     COUNTRY
     CAR
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT='Mohanty',
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
ENDSTYLE
END




Note :
3 fex files are there
1st one is the calling fex file and smohanty_fex1/2 are the called fex files.
try this way and u will get the output.

tks/sam


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
March 11, 2008, 08:45 AM
Majid Jeddi
Hi,

even with the last proposal i am getting an Excel output with HTML Tags instead of data.
I am using Excel 2000 and not 2003.
Is that the reason?

Majid


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
March 11, 2008, 09:03 AM
Tony A
Majid,

Spot on. The output you are seeing is actually XML (that Excel interprets) and for that you need the later version of Excel.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 11, 2008, 09:57 AM
Majid Jeddi
Thanks Tony, this will give me an extra hard time to make our company migrate.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
March 11, 2008, 01:42 PM
focuzsambit
i don't recall having xls2k not supporting multisheet ??
is it a excel or w/f version issue ??


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
March 11, 2008, 02:42 PM
Glenda
Sam,

When I first starting creating multitabbed excel spreadsheets, any of my users who did not have Excel 2003 experienced the same problem that Majid is now experiencing. We are on WebFOCUS 5.3.6 and when we upgraded the users to Excel 2003, the problem no longer existed.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
March 12, 2008, 08:52 AM
Majid Jeddi
Hi Glenda,

Yes it is running under Excel2003.

Thanks


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
March 12, 2008, 09:12 AM
Woody
-*******************************************************************************
-* WebFocus Technique: Create an Excel spreadsheet with multiple worksheets.
-* This procedure creates one Excel spreadsheet with five worksheets. The five
-* worksheet tabs will have the value of the first sort field. Note: Only the
-* first sort will be used for the creation of worksheets. Also, a NOPRINT
-* statement following the first sort field does not change the tab names.
-*******************************************************************************
TABLE FILE CAR
PRINT MODEL
RCOST
BY COUNTRY NOPRINT SUBTOTAL
BY CAR
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K BYTOC
END


WF 7.6.10 Unix Oracle
March 12, 2008, 09:48 AM
Tony A
Woody,

What you failed to notice in Marian's original post was that she wanted to run two different reports as opposed to one as per your example.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 12, 2008, 10:10 AM
Woody
Tony,

You are correct. I read the post too quickly.

I apologize for my mistake.

W


WF 7.6.10 Unix Oracle
March 12, 2008, 01:46 PM
Tony A
Woody, no apologies required, we can all get the wrong end of the stick occasionally Frowner
I just wanted to bring out the point just in case someone comes along and tries the example you gave but with two fexes and couldn't understand why it wouldn't work.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10