12.07.2015 Views

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SPSS Programming and Data Management, 4th Edition: A Guide for ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

31Getting<strong>Data</strong>into<strong>SPSS</strong>/TYPE=XLS/FILE='c:\examples\data\sales.xls'/SHEET=NAME 'Gross Revenue'/CELLRANGE=RANGE 'A2:I15'/READNAMES=on .• The TYPE subcomm<strong>and</strong> identifies the file type as Excel, version 5 or later. (Forearlier versions, use GET TRANSLATE.)• The SHEET subcomm<strong>and</strong> identifies which worksheet of the workbook to read.Instead of the NAME keyword, you could use the INDEX keyword <strong>and</strong> an integervalue indicating the sheet location in the workbook. Without this subcomm<strong>and</strong>,the first worksheet is read.• The CELLRANGE subcomm<strong>and</strong> indicates that <strong>SPSS</strong> should start reading at columnA, row 2, <strong>and</strong> read through column I, row 15.• The READNAMES subcomm<strong>and</strong> indicates that the first row of the specified rangecontains column labels to be used as variable names.Figure 3-5Excel worksheet read into <strong>SPSS</strong>• The Excel column label Store Number is automatically converted to the <strong>SPSS</strong>variable name StoreNumber, since variable names cannot contain spaces. Theoriginal column label is retained as the variable label.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!