Focal Point
[Case Opened] Vertical data in XLSX

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

March 24, 2016, 10:27 AM
Dev
[Case Opened] Vertical data in XLSX
Hi,

How to change text orientation to 90° for the first BY field in XLSX format in 8105.

 
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
ON TABLE PCHOLD FORMAT XLSX
END  
 

Thanks,
Dev

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


8202, 8105M, 7.7.03
March 24, 2016, 10:40 AM
jcannavo
Hello,

You could check this shared technique to see if it may be of help to you:
http://forums.informationbuild...611058331#5611058331


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
March 24, 2016, 11:03 AM
Dev
Thanks for your reply, now I believe we can achieve vertical rotation in excel using CSS.

How to change the first BY in center in vertical alignment based on the 2nd BY data. (England should come in center not in the first value(jaguar))

ENGLAND JAGUAR
JENSEN
TRIUMPH
  
SET PAGE-NUM=NOLEAD
TABLE FILE CAR
SUM SALES/D10 AS ''
BY COUNTRY BY CAR AS ''
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=HEADING, STYLE=BOLD, HEADALIGN=BODY, $
TYPE=DATA,COLUMN = COUNTRY, JUSTIFY = CENTER, CLASS=headstyle, $
ENDSTYLE
END

SET HTMLFORMTYPE=XLS
-RUN
-HTMLFORM BEGIN
<style type="text/css">
.headstyle
{
mso-rotate:90;
vertical-align:bottom;
height:75;
}
</style>
!IBI.FIL.HOLD;
-HTMLFORM END



8202, 8105M, 7.7.03
March 24, 2016, 02:01 PM
Tony A
Not entirely sure what you are asking for, but my best guess is something like this -

I know that this is HTML format but it helps me explain something in the following example code. I am using the fact that all tabular report output is driven by rows and cells. We can use this knowledge to "invent" a new column where we can add a "rowspan" attribute - which is not available in normal WF styling.

Now that leaves us with a dilemma, we can hide the "extra" column using CSS within HTML output by adding "display:none;". Unfortunately this doesn't work when we "encourage" the output to think that it's XLS output using HMTLFORMTYPE.

To see what I mean, try the example code as is, and then change the default from HTML to XLS and see what the output in MS Excel looks like.

T

SET PAGE-NUM = NOLEAD
SET HOLDLIST = PRINTONLY

-DEFAULT &WFFMT = 'HTML'

TABLE FILE CAR
SUM SALES/D10
    CNT.CAR WITHIN COUNTRY NOPRINT
    COMPUTE C_COUNTRY/A60 = IF COUNTRY NE LAST COUNTRY THEN '</td><td class="headstyle" rowspan="'||EDIT(C3)||'">'||COUNTRY||'' ELSE ''; AS ''
 BY COUNTRY NOPRINT
 BY CAR
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $
TYPE=REPORT, GRID=ON, FONT='century gothic', SIZE=9, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=HEADING, STYLE=BOLD, HEADALIGN=BODY, $
TYPE=REPORT, COLUMN=C_COUNTRY, SEQUENCE=1, CLASS=noshow, $
ENDSTYLE
END
-RUN

SET HTMLFORMTYPE=&WFFMT
-RUN
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.noshow {
 display: none;
}
.headstyle {
  mso-rotate:90;
  vertical-align:bottom;
  height:75;
  transform: rotate(-180deg);
  writing-mode: tb-lr;
  }
</style>
</head>
<body>
!IBI.FIL.HOLD;
</body>
</html>
-HTMLFORM END




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 24, 2016, 02:33 PM
Tony A
Do'h, breaking my first rule - think outside the box!

So, if you change the "noshow" class styling to the following, the "extra" ciolumn will effectively be hidden in MS Excel!

.noshow {
  display: none;
  width: 0;
}

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 30, 2016, 06:41 AM
Dev
Thanks guys Smiler

I really got some good ideas from your post.
Its working!!!!


8202, 8105M, 7.7.03
March 30, 2016, 07:37 AM
Dev
Will it be possible to achieve in compound report using SET HTMLFORMTYPE=&WFFMT OPEN.
or
without HTMTABLE hold is there any option to achieve this logic


8202, 8105M, 7.7.03
June 28, 2017, 11:36 AM
Dev
Will it be possible to achieve Excel compound report using SET HTMLFORMTYPE=Excel OPEN and close?


8202, 8105M, 7.7.03