Export custom spss tables

I want to export some special spss tables to excel. I want to export only tables and exclude syntax. I tried to select everything and exclude if, but I still get all the output.

+4
source share
5 answers

You can export the output using the command OMS. Inside this command, you can specify which output elements you want to export.

If you want to export only user tables, you can run the following command.

OMS /SELECT TABLES 
    /IF SUBTYPES = 'Custom Table'
    /DESTINATION FORMAT = XLSX 
     OUTFILE = '/mydir/myfile.xlsx'. 

... Some CTABLES Commands ...

OMSEND.

Each user table (generated from the commands CTABLES) between OMSand OMSENDwill be exported to a single .xlsx file specified by the outfile option.

OMS . SPSS.

+5

(OMS) xlsx Ctable SPSS. Month A1A. VIEWER = NO - OMS, CTables SPSS, xlsx .

   OMS
      /SELECT TABLES
      /IF COMMANDS=['CTables'] SUBTYPES=['Custom Table']
      /DESTINATION  FORMAT=XLSX
       OUTFILE ='...\Custom Tables.xlsx'
     VIEWER=NO.


 CTABLES 
    /VLABELS VARIABLES=A1A MONTH DISPLAY=LABEL 
    /TABLE A1A [C] BY MONTH [C][COLPCT.COUNT PCT40.1] 
    /CATEGORIES VARIABLES=A1A MONTH ORDER=A KEY=VALUE EMPTY=INCLUDE
    /SLABELS VISIBLE=NO 
    /TITLES
     TITLE='[UnAided Brand Awareness] A1A TOM.'
     CAPTION= ')DATE)TIME'.

 OMSEND.
+3

- , SPSSINC MODIFY OUTPUT:

get file="C:\Program Files\IBM\SPSS\Statistics\23\Samples\English\Employee data.sav".
/* Swich printback on to demo how to exclude printback in export */.
set printback on.

ctables /table jobcat[c] /titles title="Table:  Job cat".
ctables /table gender[c] /titles title="Table:  Gender".

spssinc modify output logs charts headings notes page texts warnings trees model /if process=all  /visibility visible=false.
/* Exclude the Custom Table titles */.
spssinc modify output titles /if itemtitle="Custom Tables" process=all /visibility visible=false.
output export
  /contents  export=visible  layers=visible  modelviews=printsetting
  /xlsx  documentfile="C:/Temp/Test.xlsx"
  operation=createfile sheet='CTables'
  location=lastcolumn  notescaptions=yes.
+2

, :

script (, ), excel.

, "", Excel .

0

- .sps script, , :

http://www.spsstools.net/en/scripts/577/

.sps SPSS. ctables 1 , .

script 'N:\WEB\SPSS19\FILENAME.sps'.

, / ctables . , .

0

All Articles