Focal Point
[CLOSED] Excel automatic column sizing

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

August 23, 2011, 06:00 AM
Wep5622
[CLOSED] Excel automatic column sizing
Is there some way to have columns auto-fit their contents in the EXL2K output? Our report users keep requesting that.

I know it's not terribly inconvenient to "select all" in Excel and then triple-click a column border to make it auto-size all columns, but I get the feeling that should be possible from within WebFOCUS somehow. I'm also getting a bit tired of having to explain that to people.

For an extra challenge, we use Excel 2003...

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 23, 2011, 06:29 AM
Dave
You could make an excel template with scripting in it that will "auto-fit" all columns OnLoad.

And use that...

( we've made one that sets the page to landscape and printing options to "fit to 1 page" ).


_____________________
WF: 8.0.0.9 > going 8.2.0.5
August 23, 2011, 11:12 AM
Wep5622
Not in Excel 2003 I can't...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 23, 2011, 11:25 AM
Doug
Have you tried the "WIDTH=nn" in your style sheet?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
August 23, 2011, 02:58 PM
ABT
quote:
Originally posted by Wep5622:
Not in Excel 2003 I can't...


Why not?

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
August 23, 2011, 10:51 PM
njsden
Did you try Doug's advice?

That's the only way I know to adjust the column width in Excel (wtihout resorting to templates):

TYPE=REPORT, COLUMN=N1, WIDTH=nn, $


I hate having to do that as I would prefer to rely on SQUEEZE=ON for all of my output formats.

Now, this may sound silly but if you can guarantee that your column titles are always shorter (in character lenght) than the data in their corresponding columns, then SQUEEZE=ON should give the expected results even for Excel. Sticking a "," to add a line-break in the title won't make it "shorter" as far as Excel is concerned as you may have already figured out.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.