Focal Point
[CLOSED] How to Name Worksheets in excel TOC reports?

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

February 18, 2009, 06:48 AM
Shankar
[CLOSED] How to Name Worksheets in excel TOC reports?
Hi all,
Is it possible to name worksheets depending on particular value of BY field which has been used to create Excel Tables of Contents Reports?

This message has been edited. Last edited by: Kerry,


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
February 18, 2009, 07:00 AM
<JG>
BYTOC
February 18, 2009, 07:48 AM
Shankar
JG,
That is ok.By doing BYTOC,it will generate the report with different worksheet with the name in data file.I want to give my own name to the worksheet for some values.Is it possible?

Thanks,


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
February 18, 2009, 09:03 AM
<JG>
Not unless you use a macro.

I posted a solution for this a few weeks a go. Do a search and you will find it.
February 18, 2009, 09:10 AM
Glenda
When I want to set my own tab titles, I loop through rather than using BYTOC.

Something like this maybe:

-SET &PASS     = 0;
-REDO
-SET &PASS     = &PASS + 1;
-IF  &PASS     = 6 GOTO NOMORE;
-SET &TabTitle = DECODE &PASS(1 ENG
-                             2 JAP
-                             3 ITY
-                             4 WGM
-                             5 FRA);
-SET &WHRC     = DECODE &PASS(1 'WHERE COUNTRY EQ ''ENGLAND'''
-                             2 'WHERE COUNTRY EQ ''JAPAN'''
-                             3 'WHERE COUNTRY EQ ''ITALY'''
-                             4 'WHERE COUNTRY EQ ''W GERMAN'''
-                             5 'WHERE COUNTRY EQ ''FRANCE''');
-SET &HOLDER   = DECODE &PASS(1 'ON TABLE PCHOLD FORMAT EXL2K OPEN'
-                             5 'ON TABLE PCHOLD FORMAT EXL2K CLOSE'
-                          ELSE 'ON TABLE PCHOLD FORMAT EXL2K');
TABLE FILE CAR
PRINT 
       COUNTRY
       CAR
       MODEL
       BODYTYPE
BY CAR NOPRINT 
&WHRC.EVAL
&HOLDER.EVAL
ON TABLE SET STYLE *
TYPE=REPORT,
     TITLETEXT='&TabTitle',
$
ENDSTYLE
END
-GOTO REDO
-NOMORE
-EXIT



Glenda

In FOCUS Since 1990
Production 8.2 Windows
February 20, 2009, 06:05 AM
Shankar
Hi Glenda,
I do not have any fix number of values for the field for which different worksheet will be generated.So,it is not possible to use loop here.What I want is,suppose I have blank value for my BY field,In this case the records will be populated with blank tab.I just want to name the tab.Is it possible???

Thanks.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
February 20, 2009, 08:48 AM
RSquared
Shankar,

create a define for the sort field.
eg.
/*
DEFINE FILE WHATEVER
BYTOC1/A5=IF SORTBY NE '' THEN SORTBY ELSE 'BLANK';
END

TABLE FILE WHATEVER
PRINT FIELD1
...
BY BYTOC1
...


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
February 20, 2009, 08:58 AM
Prarie
What are you going to name the Tab..if there is not a fixed value? do you want all the tabs to have the same name?