Date: Tue, 23 Jan 2001 12:05:40 -0000
Reply-To: "J.Russell" <J.Russell@SHEFFIELD.AC.UK>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "J.Russell" <J.Russell@SHEFFIELD.AC.UK>
Subject: Can Ayone complete the answer to this query
Content-type: text/plain; charset=US-ASCII
Dear All
I rarely used Scripting (Macros often) but this query seems to
require an alteration to an individuals AutoScript.
I think the crosstab part of Autoscript for this should look like:
Sub
Crosstabs_Table_Crosstabulation_Create(objTable
As Object, objOutputDoc As Object, lngIndex As
Long)
'Autoscript
'Trigger Event: Crosstabulation Table Creation
after running Crosstabs procedure.
'Effects: Changes all numbers to the format ###.#
Dim objDataCells As ISpssDataCells
Dim IngNumRows As Long
Dim IngNumCols As Long
Dim strFormat As String
strFormat="###.#"
Set objDataCells=objTable.DataCellArray
'Reformating Cells:
IngNumRows=objDataCells.NumRows
IngNumCols=objDataCells.NumColumns
Dim I As Integer, J As Integer
For I=0 To IngNumRows -1
For J=0 To IngNumCols -1
If IsNumeric(objDataCells.ValueAt(I,J))
Then
objDataCells.NumericFormatAt(I,J,strFormat)
End If
Next
Next
End Sub
I Know I have got to do some fixing yet to get it only to look at rows
with % in them but even this does not work. It keeps coming up
with Can't call a property.
Jean M. Russell
------- Forwarded message follows -------
Date sent: Tue, 23 Jan 2001 09:26:47 -0800
Subject: SPSS windows/PC query
From: Tracey Warren <t.warren@sheffield.ac.uk>
To: <j.russell@sheffield.ac.uk>
Dear Jean,
I was advised by dave Phillips to ask you about the following.
Any ideas would be really appreciated,
thanks a lot, Tracey
-----------------------------------
Dr Tracey Warren
Department of Sociological Studies
University of Sheffield
Elmfield, Northumberland Road,
Sheffield, S10 2TU.
UK.
Telephone 0114 222 6460
Fax 0114 276 8125
Email t.warren@sheffield.ac.uk
>As someone who usually used SPSS via MiMAs, I am having a niggly
>problem with
SPSS on the PC. When you are producing just normal crosstabs,
how do
you change the default layout of tables so that they automatically
exclude all those within cell '%' signs > >I can remove them by >a)
selecting all the columns and altering the format of the cell >b)
putting the table into excel and getting rid there.
>BUT I want it to happen automatically. Its got to be easy hasn't it,
>but I have searched and searched.
>
>I am using my own .tlo file to format the tables, but all the many
>ones that SPSS offers (SPSS normal, academic, column, etc etc) have
>the % sign within cells too.
>
------- End of forwarded message -------
------------------------------------------------------
Jean M. Russell M.A. M.Sc. J.Russell@sheffield.ac.uk
Corporate Information & Computing Services,
University of Sheffield
285 Glossop Road
Sheffield
S10 2HB
United Kingdom
Phone: 0114-222-3098
Fax : 0114-222-3040