Focal Point
[TECHNIQUE] Turning text 45 degrees in Excel output

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

April 14, 2005, 12:17 PM
S.J. Kadish
[TECHNIQUE] Turning text 45 degrees in Excel output
FOCUS nation:

We have a client who would like to rotate the text in ACROSSCOLUMNs 45 degrees so that is it readily printable. (PDF does not work here since there is no way to wrap PDF text.)

1.) Is there a stylesheet that can rotate the text 45 degrees clockwise?

2.) For the IBI staff - is this a function that might be available in a soon-to-be released version of Developer Studio or Report Assistant?

This message has been edited. Last edited by: Kerry,
April 14, 2005, 02:25 PM
Lenny Ward
I'm not sure if it works with across, but you can wrap text in a column using PDF.

TYPE=REPORT, COLUMN=P6, POSITION=6.50, WRAP=3.45, $

Lenny
April 14, 2005, 03:00 PM
<JG>
In 7.1 you can use Excel Templates (VB macro scripts) to set the text orientation for EXL2K output format.

In 5.x that option is not available as standard. However I have developed a method for including Excel macro's into any version of WebFocus supporting EXL2K, EXL2K FORMULA and EXL2K PIVOT.

I am in the process of preparing an article for publication at the moment and will submit it as soon as it's finished.

If you want a preview copy send me a message with your e-mail address
May 17, 2005, 08:46 PM
S.J. Kadish
John - your notes were very good but do not help us at this site. Basically, what we need is some style sheet setting like

TYPE=TITLE,
FONT='ARIAL',
SIZE=5,
JUSTIFY=CENTER,
ORIENT=-90, Roll Eyes Confused
$

which would equate to rotating the conventional Excel 2000 titles by 90 degrees similar to the display option when opening an Excel 200 spreadsheet.
May 19, 2005, 08:34 AM
<JG>
Sandy, It's a pain but the only way your going to get rotated text in Excel is to use a macro. WebFocus just cannot pass through the required formatting. Even in 7.1 it�s not going to be possible which is why they�ve introduced template support.
If it�s possible for you to send me a copy of the .xht file I can take a look at it for you.
If the content of the report is confidential generate a copy with garbage content, don't save it in Excel because that changes the internal structure of the document.
January 14, 2011, 11:15 AM
S.J. Kadish
Sub Column_Titles()
'
' Column_Titles Macro
' Macro recorded 10/12/2010 by Sanford Kadish
' Headings copied over to the Spins header
' Take - tilt 45 degrees and copy over
' additional centering

Sheets("Sheet2").Select
Range("E1:J1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 90
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("E1:J1").Select
Selection.Copy
Sheets("Over - Under Price Analysis").Select
Range("I19.N19").Select
ActiveSheet.Paste
End Sub


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
January 16, 2011, 03:50 AM
<JG>
Hey Sandy, 5 years 8 months to reply to a post.

That has to be a record.
January 16, 2011, 07:32 PM
Francis Mariani
Fantastic!


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
January 18, 2011, 03:58 PM
Kerry
Thanks Sandy for sharing the technique with all.

FYI, this is also possible using external CSS (Cascading Style Sheets):
DS:Column titles in an ACROSS to be displayed at an angle?

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
January 18, 2011, 04:53 PM
<JG>
quote:
FYI, this is also possible using external CSS (Cascading Style Sheets):


Yes, but that's not EXL2K format.
January 24, 2011, 08:34 AM
S.J. Kadish
My current position requires some very intricate VBA macros for EXL2K output. I recommend a webinar on macros.

What say ye all? (Being from the Southern Tier: What do ya'll think 'bout that?)

Sandy


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
January 24, 2011, 08:55 AM
Dave
Being from another part of the world ( i.e. not north nor south ) I say : "This has nothing to do with WF. It's Microsoft technology. Get your info there..."

And yes.. a style-item:
TEXT-ROTATION:
would have been nice.

With the introduction of EXL07 ( binary ) it might even be possible.

I still wonder.. .css and exl... really not possible?

greets,
D


_____________________
WF: 8.0.0.9 > going 8.2.0.5
January 24, 2011, 12:38 PM
<JG>
quote:
. I recommend a webinar on macros.

Got to say I agree with Dave.

Need Microsoft training goto Microsoft Need IB training goto IB.
January 24, 2011, 02:35 PM
Francis Mariani
Based on Kerry's suggestion:

SET PAGE-NUM=NOLEAD

TABLE FILE CAR
SUM
SALES/D10 AS ''

BY COUNTRY
ACROSS MODEL 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=ACROSSVALUE, CLASS=headstyle, $
ENDSTYLE
END

SET HTMLFORMTYPE=XLS
-RUN

-HTMLFORM BEGIN
<style type="text/css">
.headstyle
{
mso-rotate:45;
vertical-align:bottom;
height:175;
}
</style>

!IBI.FIL.HOLD;
-HTMLFORM END



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
February 25, 2011, 02:01 PM
j.gross
But note that, when you specify FORMAT HTMTABLE to TABLE, it has no clue that the output is for Excel. Any syntax or semantics specific to EXL2K (e.g., BYTOC handling) is bound to fail.