StaSpreadsheet Members

Functions

Name Description
AddCases Adds the specified number of cases to the spreadsheet and fills with MD.
AddCasesNoFill Adds the specified number of cases to the spreadsheet, does not fill with MD. You must set data for all cells in the new cases.
AddVariables Adds a specified number of variables to the spreadsheet.
Clone Clone the current spreadsheet. Return value: StaSpreadsheet.
Close Closes the spreadsheet.
Create Create a new spreadsheet.
CreateForWrite Create a new spreadsheet for write; the data is left uninitialized. You must set data for every cell.
DeleteCases Deletes the specified range of cases from the spreadsheet.
DeleteVariables Deletes the specified range of variables from the spreadsheet.
Fill -
GetData Get spreadsheet data as 2-D array of variant. Text type variables returned as strings, numeric as numbers (or text labels if desired.). Return value: Variant.
GetData2 Get spreadsheet data as 2-D array of variant. Text type variables returned as strings, numeric as numbers (or text labels if desired.). Return value: Variant.
GetTextLabelInfo Returns array containing text labels, descriptions, or associated numeric values for a specified variable. Return value: Variant.
GetVariableInfo Get selected spreadsheet variable information as a single-dim array of variant. Return value: Variant.
IsValidFormula Verify the well-formedness of a specified formula. Return value: Boolean.
Join Return value: StaSpreadsheet.
LoadFromByteArray Loads content from a previously saved BYTE array, replacing this current object's data.
MergeCases Append the cases from the given spreadsheet to the calling spreadsheet.
Open Open a spreadsheet.
OpenFromEnterprise Load a spreadsheet from a spreadsheet previously saved to enterprise as a 'General Document'.
OptimalTextVariableWidths Returns longest text value length(s) in data so text variable length can be set to minimum without truncation. Return value: Variant.
Recalculate Recalculate the specified variable formula (optionally within a specified case range).
RemoveAllLabels Removes all text labels for the specified variable.
RemoveTextLabel Removes a text label for the specified variable.
Reverse Reverse the order of the cases in the spreadsheet.
Save Save the spreadsheet.
SaveAs Save the spreadsheet to a new file.
SaveToByteArray Save a StaSpreadsheet to an in memory BYTE array. Return value: Variant.
SetData Set spreadsheet data as 2-D array of variant.
SetDiff Return a spreadsheet containing the Set Difference of the cases from the two spreadsheets. Return value: StaSpreadsheet.
SetIntersect Return a spreadsheet containing the Set Intersection of the cases from the two spreadsheets. Return value: StaSpreadsheet.
SetObjectManager Set an instance of ObjectManager for use in places where an enterprise connection is needed and we aren't running in Statistica.
SetSize Sets the size of the spreadsheet.
SetTextLabel Sets a new text label for the specified variable.
SetTextVariableWidths Sets text variable widths for multiple variables at once.
SetUnion Return a spreadsheet containing the Set Union of the cases from the two spreadsheets. Return value: StaSpreadsheet.
Sort Sort the spreadsheet in place. Pass single value or array of enums StaSpreadsheetSortOrder and StaSpreadsheetCompareType in SortOrders and CompareTypes.
SortCopy Return a new, sorted version of this spreadsheet. Pass single value or array of enums StaSpreadsheetSortOrder and StaSpreadsheetCompareType in SortOrders and CompareTypes. Return value: StaSpreadsheet.
StripFormatting Strips formatting from returned strings (case names, variable names, etc.). Return value: String.
UniqueCases Return a spreadsheet containing the unique cases only, based on key values in Variables. Return value: StaSpreadsheet.
VariableNumber Lookup 1-based variable index from variable name. Return value: Long.
VariableSetTextType Change a variable to Text type and sets the length in one step.
VariableTextLabels Returns three arrays of numeric values, corresponding text labels, and text label descriptions for the specified variable.

Properties

Name Description
AutoStripFormatting Get/Set whether or not to automatically strip formatting codes from text values. Return/assignment value: Boolean.
CData Returns/sets a case vector as an array of doubles. Return/assignment value: Variant.
CacheSize Get/Set the cache size. -1 for 'default', 0 for unload, >0 for specific value recommendation. Return/assignment value: Long.
CaseLength Returns the length in bytes of a single case raw data. Return value: Long. This property is read only.
CaseName Returns/sets the specified case name. Return/assignment value: String.
CaseNameIndex Case name exists => returns a corresponding case index, otherwise 0. Return value: Long. This property is read only.
CaseNameLength Returns/sets the case name length. Return/assignment value: Long.
CaseNames Get/set all case names as array of string. Return/assignment value: Variant.
CaseStateData Return/assignment value: Long.
Data Returns/sets the spreadsheet data as a two dimensional array of doubles. Return/assignment value: Variant.
Dictionary Get the dictionary object for storing custom data as name-value pairs. Return value: Object. This property is read only.
EventsEnabled Returns/sets events enabled. Return/assignment value: Boolean.
Header Get/set the header text. Return/assignment value: String.
InfoBox Get/set the infobox text. Return/assignment value: String.
InputSpreadsheet Returns/sets whether the spreadsheet is an input spreadsheet. Return/assignment value: Boolean.
InputSpreadsheetObj Get a Statistica.InputSpreadsheet object for this StaSpreadsheet. Return value: Object. This property is read only.
MissingData Returns whether the specified cell is missing data. Return value: Boolean. This property is read only.
Name Returns/sets the name of the spreadsheet as a string. Return/assignment value: String.
NumberOfCases Returns the number of cases in the spreadsheet. Return value: Long. This property is read only.
NumberOfTextLabels Returns the number of text labels assigned to the spreadsheet. Return value: Long. This property is read only.
NumberOfVariables Returns the number of variables in the spreadsheet. Return value: Long. This property is read only.
Path Returns the file path of the spreadsheet. Return value: String. This property is read only.
PathName Returns the full name (including file path) of the spreadsheet. Return value: String. This property is read only.
Saved Returns/sets the saved state of the spreadsheet. Return/assignment value: Boolean.
SelectionConditionsEnabled Get/Set selection conditions enabled. Return/assignment value: Boolean.
Subset Creates a new spreadsheet containing the specified subset of the current spreadsheet using Selection Conditions. Return value: StaSpreadsheet. This property is read only.
Text Returns the text value of the specified cell. Return value: String. This property is read only.
TextEx Returns the text value of the specified cell, formatted with the format string. Return value: String. This property is read only.
TextLabel Returns the text label for the specified value in the specified variable. Return value: String. This property is read only.
TextLabelDescription Returns the text label description for the specified value in the specified variable. Return value: String. This property is read only.
TextLabelValue Returns the value for the specified text label in the specified variable. Return value: Variant. This property is read only.
VData Returns/sets a variable vector as an array of doubles. Return/assignment value: Variant.
Value Get/Set the value within the specified cell of the spreadsheet. Return/assignment value: Double.
ValueEx Get the value within the specified cell of the spreadsheet as a Variant. Return value: Variant. This property is read only.
VariableFormatString Returns/sets the display format of the specified variable index. Return/assignment value: String.
VariableLongName Returns/sets the long name of the specified variable as a string. Return/assignment value: String.
VariableMissingData Returns/sets the missing data value for the specified variable. Return/assignment value: Double.
VariableName Returns/sets the name of the specified variable as a string. Return/assignment value: String.
VariableNames Get/Set an array of all variable names. Return/assignment value: Variant.
VariableType Returns/Sets the type of the specified variable. Return/assignment value: StaVariableType.
VariableTypeLength Returns/sets the maximum length of the specified variable (if variable type is set to text) as an integer. Return/assignment value: Long.

Events

Name Description
Activate Called when the spreadsheet is brought to the front.
BeforeAddToWorkbook Called before spreadsheet is added to a workbook.
BeforeClose Called before the spreadsheet is closed.
BeforeDataChange Called before data has been altered.
BeforeDoubleClick Called when any area of the spreadsheet has been double clicked.
BeforePrint Called before the spreadsheet is printed.
BeforeRightClick Called when any area of the spreadsheet has been right clicked.
BeforeSave Called before the spreadsheet is saved.
BeforeStructureChange Called when the size of the spreadsheet has changed.
DataChanged Called when the data within a cell has been altered.
Deactivate Called when the spreadsheet loses the focus.
OnClose Called when the spreadsheet is closed.
OnQueryRunComplete Called when running the query is finished.
OnQueryRunError Called when running the query has an error.
Open Called when the spreadsheet is opened.
SelectionChange Called when the selection within the spreadsheet has moved.
StructureChanged Called when the size of the spreadsheet has changed.