Focal Point
[CLOSED]Working with multiple excel worksheets

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

August 25, 2016, 07:07 AM
MrM
[CLOSED]Working with multiple excel worksheets
Hi,

I use the following application. My expectation is that I get three worksheets but only the first is shown.
I think this worked, any idea what I'm doing wrong


-* Create Excel Worksheet 1 

TABLE FILE CAR 
PRINT COUNTRY
HEADING
"Report A" 
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
    TITLETEXT='Worksheet 1',
$
     INCLUDE = endeflt,
$
ENDSTYLE
END

-* Create Excel Worksheet 2

DEFINE FILE CAR
MLD/A20 = 'Just a message';
END 

TABLE FILE CAR 
PRINT MLD AS ''
BY COUNTRY NOPRINT
HEADING
"Report B" 
WHERE RECORDLIMIT EQ 1
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K 
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
    TITLETEXT='Worksheet 2"',
$
     INCLUDE = endeflt,
$
ENDSTYLE
END 
 
-* Create Excel Worksheet 3

TABLE FILE CAR 
PRINT CAR
HEADING
"Report C" 
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K CLOSE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
    TITLETEXT='Worksheet 3',
$
     INCLUDE = endeflt,
$
ENDSTYLE
END




This message has been edited. Last edited by: <Emily McAllister>,
August 25, 2016, 08:39 AM
Tom Flynn
Need to open the manual and look at how to use stylesheets.
Get all 3 with this:
  
-* Create Excel Worksheet 1 

TABLE FILE CAR 
PRINT COUNTRY
HEADING
"Report A" 
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Worksheet 1',$
ENDSTYLE
END

-* Create Excel Worksheet 2

DEFINE FILE CAR
MLD/A20 = 'Just a message';
END 

TABLE FILE CAR 
PRINT MLD AS ''
BY COUNTRY NOPRINT
HEADING
"Report B" 
WHERE RECORDLIMIT EQ 1
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K 
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Worksheet 2',$
ENDSTYLE
END 
 
-* Create Excel Worksheet 3

TABLE FILE CAR 
PRINT CAR
HEADING
"Report C" 
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K CLOSE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Worksheet 3',$
ENDSTYLE
END
-EXIT



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 26, 2016, 02:13 PM
MrM
Tom,

Thanks for your reply but did not worked for me. I'll fix it with separate drilldowns.

Thanks,
Mark
August 29, 2016, 06:06 AM
Ricardo Augusto
TomĀ“s code works like a charm!


WebFOCUS 8.1.05 / APP Studio
August 29, 2016, 08:57 AM
Tony A
quote:
open the manual and look at how to use

How applicable is that to many of the questions that have been asked in recent times? Frowner

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 
August 30, 2016, 05:55 AM
MrM
Hi,

I'm sure the code works but as I said not for me, this because we have many problems with version 8105. This is one of the problem, when I run the application I only get the first report so 'Report A'.
Other problems ar hold global parameters strange behavior using FML reports in combination with Hyperstage etc.
August 30, 2016, 06:10 AM
Ricardo Augusto
MrM, it makes no sense.

Do you still need some help to handle multiples worksheets?

Post your errors/problems and what are you trying to reach.

This message has been edited. Last edited by: Ricardo Augusto,


WebFOCUS 8.1.05 / APP Studio
September 01, 2016, 01:34 AM
MrM
To All

Thanks for your help, I've reprogrammed it by using drilldowns.
But can anyone confirm that the fex supplied by Tom works in version 8.1.0.5. if so then I think the installation of 8.1.0.5 is not correct.
September 01, 2016, 09:07 AM
Tom Flynn
My signature is up-to-date.


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
September 01, 2016, 09:24 AM
jgelona
MrM,

Have you upgraded to 8.1.05m?


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.