Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Add Leading Spaces to Excel EXL07

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Add Leading Spaces to Excel EXL07
 Login/Join
 
Member
posted
Hi, is there a way to add trailing spaces to an excel formatted as EXL07? I want the result set to look like below where the + are actual spaces. Any suggestions?

COUNTRY
-------
ENGLAND
++++++++++++JAPAN
++ITALY
+++++++W GERMANY
++++++++++++++++++++++FRANCE

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
 
Posts: 19 | Registered: October 28, 2016Report This Post
Member
posted Hide Post
My question should have said LEADING spaces, not trailing.


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
 
Posts: 19 | Registered: October 28, 2016Report This Post
Platinum Member
posted Hide Post
Hello,

To better understand the request why exactly are the amount of spaces for each country so random? Not sure the best method to do what you're trying to do. If you were trying to standardize the length of the column and then right justify them so they all line up it would make sense, but when the amount of spaces seem to be random it's hard to understand the usage here.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Expert
posted Hide Post
Ditto with above, more info on the requirements would help.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Searching the forum I found this nugget, it's for trailing spaces but perhaps you can use it for leading...thing is though they're adding a specific amount of spaces to each so again if you're looking for more random spacing this may not be of help...


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Expert
posted Hide Post
Instead of using spaces use HEXBYT(160,'A1') for each space that you require - which is a "special" space character. If your string already exists, consider using STRREP on the spaces - HEXBYT(32,'A1').

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
Have you tried ON TABLE SET SHOWBLANKS=ON? Works for me.

SHOWBLANKS
The SHOWBLANKS parameter preserves leading and internal blanks in HTML and EXL2K report output. 

The syntax is:

SET SHOWBLANKS = {OFF|ON}
where:

OFF
Removes leading and internal blanks in HTML and EXL2K report output. OFF is the default value.

ON 
Preserves leading and internal blanks in HTML and EXL2K report output


I know it says EXL2K but it works in XLSX as well. They probably need to update the documentation.

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


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Member
posted Hide Post
I should have added--the amount of spaces would be fixed. The end goal is to the have the Country column indented based on which Country is present. If it's England, no indentation. If it's Italy, 2 spaces, etc.

I'm using 7705 and tried SET SHOWBLANKS = {OFF|ON}, but that doesn't seem to work for me.


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
 
Posts: 19 | Registered: October 28, 2016Report This Post
Member
posted Hide Post
I'm using WebFocus 7705.


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
 
Posts: 19 | Registered: October 28, 2016Report This Post
Member
posted Hide Post
I used Tony's suggestion and came up with a solution--

TABLE FILE CAR
PRINT
COUNTRY
COMPUTE INDENTED_COUNTRY/A500 = IF COUNTRY EQ 'ENGLAND' THEN COUNTRY
ELSE IF COUNTRY EQ 'JAPAN' THEN HEXBYT(160, 'A12') | COUNTRY
ELSE IF COUNTRY EQ 'ITALY' THEN HEXBYT(160, 'A2') | COUNTRY
ELSE IF COUNTRY EQ 'W GERMANY' THEN HEXBYT(160, 'A7') | COUNTRY
ELSE IF COUNTRY EQ 'FRANCE' THEN HEXBYT(160, 'A23') | COUNTRY
ELSE COUNTRY;
ON TABLE PCHOLD FORMAT EXL07
END
-RUN


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
 
Posts: 19 | Registered: October 28, 2016Report This Post
Master
posted Hide Post
I've been using SET SHOWBLANKS ON successfully with XLSX ever since IBI supported XLSX.

Try this:
TABLE FILE CAR
PRINT COUNTRY
      COMPUTE BLANKS/A24=HEXBYT(160,'A1');
      COMPUTE INDENTED_COUNTRY/A500 =
	IF COUNTRY EQ 'JAPAN' THEN EDIT(BLANKS,'9999999999999') | COUNTRY ELSE
	IF COUNTRY EQ 'ITALY' THEN EDIT(BLANKS,'999') | COUNTRY ELSE
	IF COUNTRY EQ 'W GERMANY' THEN EDIT(BLANKS,'99999999') | COUNTRY ELSE
	IF COUNTRY EQ 'FRANCE' THEN BLANKS | COUNTRY ELSE COUNTRY;
ON TABLE SET SHOWBLANKS ON
ON TABLE PCHOLD FORMAT EXL07
END


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Add Leading Spaces to Excel EXL07

Copyright © 1996-2020 Information Builders