[SOLVED]How to retain dash symbol in excel tab names
Hi all,
I tried to have dash in tab names of an Excel report. However, Some of the tab names are missing dash "-" as in the example below. Does anyone know how to do it?
Solution: replaced dash with forward slash.
-SET &I=1;
-REPEAT :LOOP 6 TIMES
-SET &SUM_RPT = IF &I EQ 1 THEN 'TEST 01–02'
- ELSE IF &I EQ 2 THEN '8–39 TEST'
- ELSE IF &I EQ 3 THEN 'Summary 8–39'
- ELSE IF &I EQ 4 THEN '8–39 - Cases – B-B'
- ELSE IF &I EQ 5 THEN 'Type 01 – 02'
- ELSE IF &I EQ 6 THEN '01-02 Cases'
- ELSE 'ERROR';
-SET &OPEN_CLOSE_RPT = IF &I EQ 6 THEN 'CLOSE' ELSE 'OPEN';
TABLE FILE CAR
SUM CAR BODYTYPE
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K &OPEN_CLOSE_RPT
ON TABLE SET STYLE *
TYPE=REPORT,font='Arial', size=10,ORIENTATION=LANDSCAPE,TITLETEXT='&SUM_RPT.EVAL' ,$
ENDSTYLE
END
-SET &I=&I+1;
-:LOOP
-EXIT
Thanks, PkuThis message has been edited. Last edited by: Pku,
Thanks, Pku
Focus, WebFocus 8201 on Windows
March 04, 2015, 04:41 PM
Francis Mariani
This seems to work in WF 8.0.08:
I do notice some of the dashes are of a different width - n dash or m dash perhaps...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 27, 2015, 11:55 AM
cs_source
Hey Pku/Francis Mariani,
How did you make this work when you referenced two different reports, example tab A is a report for country and tab B is a report for model? When i run i get the following tabs listed:
COUNTRY (shows the country report), RECOVERED_SHEET1 (shows the model report), MODEL (shows the country report)
-SET &I=1; -REPEAT :LOOP 2 TIMES
-SET &SUM_RPT = IF &I EQ 1 THEN 'COUNTRY' - ELSE IF &I EQ 2 THEN 'MODEL' - ELSE 'ERROR';
-SET &OPEN_CLOSE_RPT = IF &I EQ 2 THEN 'CLOSE' ELSE 'OPEN';
TABLE FILE CAR SUM CAR BODYTYPE BY COUNTRY ON TABLE PCHOLD FORMAT EXL2K &OPEN_CLOSE_RPT ON TABLE SET STYLE * TYPE=REPORT,font='Arial', size=10,ORIENTATION=LANDSCAPE,TITLETEXT='&SUM_RPT.EVAL' ,$ ENDSTYLE END
TABLE FILE CAR SUM CAR BODYTYPE BY MODEL ON TABLE PCHOLD FORMAT EXL2K &OPEN_CLOSE_RPT ON TABLE SET STYLE * TYPE=REPORT,font='Arial', size=10,ORIENTATION=LANDSCAPE,TITLETEXT='&SUM_RPT.EVAL' ,$ ENDSTYLE END
-SET &I=&I+1; -:LOOP -EXITThis message has been edited. Last edited by: cs_source,
WebFocus 8.02, SQL Server 2008r2
May 27, 2015, 02:59 PM
Francis Mariani
I've noticed if the two tabs have the same name, the second gets overridden with "RECOVERED_SHEET1". Try providing a different name for each tab.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 01, 2015, 08:56 PM
cs_source
hi Francis,
Thank you that did help when I made the change in names I get repetitive tab names:
-SET &I=1; -REPEAT :LOOP 2 TIMES
-SET &SUM_RPT = IF &I EQ 1 THEN 'DQ1' - ELSE IF &I EQ 2 THEN 'DQ2' - ELSE 'ERROR';
-SET &OPEN_CLOSE_RPT = IF &I EQ 2 THEN 'CLOSE' ELSE 'OPEN';
TABLE FILE CAR SUM CAR BODYTYPE BY COUNTRY ON TABLE PCHOLD FORMAT EXL2K &OPEN_CLOSE_RPT ON TABLE SET STYLE * TYPE=REPORT,font='Arial', size=10,ORIENTATION=LANDSCAPE,TITLETEXT='&SUM_RPT.1' ,$ ENDSTYLE END
TABLE FILE CAR SUM CAR BODYTYPE BY MODEL ON TABLE PCHOLD FORMAT EXL2K &OPEN_CLOSE_RPT ON TABLE SET STYLE * TYPE=REPORT,font='Arial', size=10,ORIENTATION=LANDSCAPE,TITLETEXT='&SUM_RPT.2' ,$ ENDSTYLE END
-SET &I=&I+1; -:LOOP -EXIT
Output is: DQ1 -(country report), DQ21 -(bodytype report), DQ12 -(country report again...), it seems that's its looping 3 times, even with the different tab names.