Products | Versions |
---|---|
Spotfire Statistica | 12.7 and higher |
Statistica spreadsheets used to have a default missing data value of -9999. So any empty cell contained -9999 "under the hood".
But -9999 was not considered unusual enough. Some spreadsheets might contain legitimate values of -9999, and those would appear as blank, instead of displaying -9999.So the default missing data value was changed to -999999998 starting from Version 8.
This change can lead to confusion when moving empty cells from an older spreadsheet with a missing data value of -9999 to a newer spreadsheet with a missing data value of -999999998.
You will notice the empty cells in the older spreadsheet contained -9999. When those -9999 value are placed into the newer spreadsheet, -9999 is not considered a missing data indicator in the destination spreadsheet. So -9999 is displayed.
The missing data value can be adjusted in 2 ways:
1) Change the global option used for all spreadsheets by selecting the Home tab, and then Options.
2) Change the value used for individual spreadsheet variables by double--clicking on the variable header.
In SVB, you can copy the missing data value from variables in the source spreadsheet to variables in the destination spreadsheet. For example:
Sub Main
Dim ss As Spreadsheet
Set ss = ActiveDataSet
'Get data from source spreadsheet
Dim vData As Variant
Set vData = ss.GetData(1,10,1,4)
'Create new spreadsheet to receive data
Dim ssTwo As Spreadsheet
Set ssTwo = Spreadsheets.New
ssTwo.SetSize(10,4)
'Set missing data value in new spreadsheet to be the same
'as the missing data value in the source spreadsheet
Dim i As Long
For i = 1 To 4
ssTwo.VariableMissingData(i) = ss.VariableMissingData(i)
Next i
'Put data from source spreadsheet into new spreadsheet
ssTwo.SetData(1,1,vData)
ssTwo.Visible = True
End Sub