SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

How can I change the width of only one column via syntax

  • 1.  How can I change the width of only one column via syntax

    Posted Fri February 12, 2021 12:02 PM

    Hello!

    I use CTABLE to produce a table with my results

    I want to increase the width of the very first column, where the descriptions of the variables are. However, online I can only find how to do this via the menu or directly in the Output. The only thing for the syntax I found was to change the MINCOLWIDTH, but then this applies to all columns in the table and then the columns with only the values are way too wide.

    Is this fixable or do I have to live with having to do it manually or ignoring it?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: How can I change the width of only one column via syntax

    Posted Fri February 12, 2021 02:39 PM

    The row label widths are set automatically, but you can control this in two ways.

    One is to use the SPSSINC MODIFY TABLES extension command like this. On the WIDTHS subcommand specify the label columns to adjust and width in points for each. Label column numbering starts with 0. Label 0 is normally not visible.

    SPSSINC MODIFY TABLES subtype="customtable"

    SELECT="<<ALL>>"

    DIMENSION= ROWS LEVEL = -1

    PROCESS = PRECEDING

    /WIDTHS ROWLABELS=0 1 2 ROWLABELWIDTHS=50 50 50

    /STYLES APPLYTO=LABELS.

    Another is to create a tableLook with the minimum and maximum widths specified. You can do that by creating a table, editing it in the pivot table editor, and using the row label widths parameters, and saving that as a tableLook. Then apply that look using SPSSINC MODIFY TABLES using, e.g.,

    /STYLES APPLYTO=LABELS

    TLOOK="c:\temp\twoinches.stt".

    Extension commands can be installed via the Extensions > Extension Hub menu.






    #SPSSStatistics
    #Support
    #SupportMigration