wxAutoExcel  2.0.0
wxAutoExcel::wxExcelRange Class Reference

Represents Microsoft Excel Range, i.e. More...

Inheritance diagram for wxAutoExcel::wxExcelRange:
wxAutoExcel::wxExcelRangeOwner wxAutoExcel::wxExcelObject

Public Member Functions

bool Activate ()
 Activates a single cell, which must be inside the current selection. More...
 
wxExcelComment AddComment (const wxString &text=wxEmptyString)
 Adds a comment to the range. More...
 
bool AdvancedFilter (enum XlFilterAction action, wxExcelRange *criteriaRange=NULL, wxExcelRange *copyToRange=NULL, wxXlTribool unique=wxDefaultXlTribool)
 Filters or copies data from a list based on a criteria range. More...
 
void AllocateChanges ()
 Performs a writeback operation for all edited cells in a range based on an OLAP data source. More...
 
void ApplyNames (wxArrayString *names=NULL, wxXlTribool ignoreRelativeAbsolute=NULL, wxXlTribool useRowColumnNames=wxDefaultXlTribool, wxXlTribool omitColumn=wxDefaultXlTribool, wxXlTribool omitRow=wxDefaultXlTribool, XlApplyNamesOrder *order=NULL, wxXlTribool appendLast=wxDefaultXlTribool)
 Applies names to the cells in the specified range. More...
 
void ApplyOutlineStyles ()
 Applies outlining styles to the specified range. More...
 
wxString AutoComplete (const wxString &str)
 Returns an AutoComplete match from the list. More...
 
bool AutoFill (wxExcelRange destination, XlAutoFillType *type=NULL)
 Performs an autofill on the cells in the specified range. More...
 
bool AutoFilter (long *field=NULL, const wxString &criteria1=wxEmptyString, XlAutoFilterOperator *oper=NULL, const wxString &criteria2=wxEmptyString, wxXlTribool visibleDropDown=wxDefaultXlTribool)
 Filters a list using the AutoFilter. More...
 
bool AutoFit ()
 Changes the width of the columns in the range or the height of the rows in the range to achieve the best fit. More...
 
void AutoOutline ()
 Automatically creates an outline for the specified range. More...
 
bool BorderAround (XlLineStyle *lineStyle=NULL, XlBorderWeight *weight=NULL, long *colorIndex=NULL, const wxColour *color=NULL)
 Adds a border to a range and sets the Color, LineStyle, and Weight properties for the new border. More...
 
void Calculate ()
 Calculates the range. More...
 
void CalculateRowMajorOrder ()
 Calculates the range the same way Excel 2000 and earlier did. More...
 
void CheckSpelling (const wxString &customDictionary=wxEmptyString, wxXlTribool ignoreUpperCase=wxDefaultXlTribool, wxXlTribool alwaysSuggest=wxDefaultXlTribool, MsoLanguageID *spellLang=NULL)
 Checks the spelling of an object. More...
 
bool Clear ()
 Clears the entire object. More...
 
bool ClearComments ()
 Clears all cell comments from the specified range. More...
 
bool ClearContents ()
 Clears the formulas from the range. More...
 
bool ClearFormats ()
 Clears the formatting of the object. More...
 
bool ClearHyperlinks ()
 Removes all hyperlinks from the specified range. More...
 
bool ClearNotes ()
 Clears notes and sound notes from all the cells in the specified range. More...
 
bool ClearOutline ()
 Clears the outline for the specified range. More...
 
wxExcelRange ColumnDifferences (wxExcelRange comparison)
 Returns a Range Represents all the cells whose contents are different from the comparison cell in each column. More...
 
bool Copy (const wxExcelRange *destination=NULL)
 Copies the range to the specified range or to the Clipboard. More...
 
bool CopyPicture (XlPictureAppearance *appearance=NULL, XlCopyPictureFormat *format=NULL)
 Copies the selected object to the Clipboard as a picture. More...
 
bool CreateNames (wxXlTribool top=wxDefaultXlTribool, wxXlTribool left=wxDefaultXlTribool, wxXlTribool bottom=wxDefaultXlTribool, wxXlTribool right=wxDefaultXlTribool)
 Creates names in the specified range, based on text labels in the sheet. More...
 
bool Cut (const wxExcelRange *destination=NULL)
 Cuts the object to the Clipboard or pastes it into a specified destination. More...
 
bool DataSeries (XlRowCol *rowCol=NULL, XlDataSeriesType *type=NULL, XlDataSeriesDate *date=NULL, long *step=NULL, const wxVariant &stop=wxNullVariant, wxXlTribool trend=wxDefaultXlTribool)
 Creates a data series in the specified range. More...
 
bool Delete (XlDeleteShiftDirection *shift=NULL)
 Deletes the object. More...
 
void Dirty ()
 Designates a range to be recalculated when the next recalculation occurs. More...
 
void DiscardChanges ()
 Discards all changes in the edited cells of the range. More...
 
void ExportAsFixedFormat (XlFixedFormatType type, const wxString &fileName=wxEmptyString, XlFixedFormatQuality *quality=NULL, wxXlTribool includeDocProperties=wxDefaultXlTribool, wxXlTribool ignorePrintAreas=wxDefaultXlTribool, long *from=NULL, long *to=NULL, wxXlTribool openAfterPublish=wxDefaultXlTribool)
 Exports to an XPS or PDF file. More...
 
bool FillDown ()
 Fills down from the top cell or cells in the specified range to the bottom of the range. More...
 
bool FillLeft ()
 Fills left from the rightmost cell or cells in the specified range. More...
 
bool FillRight ()
 Fills right from the leftmost cell or cells in the specified range. More...
 
bool FillUp ()
 Fills up from the bottom cell or cells in the specified range to the top of the range. More...
 
void FlashFill ()
 Flash Fill automatically fills the data when it senses a pattern. More...
 
void FunctionWizard ()
 Starts the Function Wizard for the upper-left cell of the range. More...
 
bool Insert (XlInsertShiftDirection *shift)
 Inserts a cell or a range of cells into the worksheet or macro sheet and shifts other cells away to make space. More...
 
void InsertIndent (long insertAmount)
 Adds an indent to the specified range. More...
 
bool Justify ()
 Rearranges the text in a range so that it fills the range evenly. More...
 
bool ListNames ()
 Pastes a list of all nonhidden names onto the worksheet, beginning with the first cell in the range. More...
 
void Merge (wxXlTribool across=wxDefaultXlTribool)
 Creates a merged cell from the specified Range object. More...
 
bool NavigateArrow (wxXlTribool towardPrecedent=wxDefaultXlTribool, long *arrowNumber=NULL, long *linkNumber=NULL)
 Navigates a tracer arrow for the specified range to the precedent, dependent, or error-causing cell or cells. More...
 
bool PasteSpecial (XlPasteType *paste=NULL, XlPasteSpecialOperation *operation=NULL, wxXlTribool skipBlanks=wxDefaultXlTribool, wxXlTribool transpose=wxDefaultXlTribool)
 Pastes a Range from the Clipboard into the specified range. More...
 
bool PrintOut (long *from=NULL, long *to=NULL, long *copies=NULL, wxXlTribool preview=wxDefaultXlTribool, const wxString &activePrinter=wxEmptyString, wxXlTribool printToFile=wxDefaultXlTribool, wxXlTribool collate=wxDefaultXlTribool, const wxString &prToFileName=wxEmptyString)
 Prints the object. More...
 
bool PrintPreview (wxXlTribool enableChanges=wxDefaultXlTribool)
 Shows a preview of the object as it would look when printed. More...
 
void RemoveDuplicates (const wxArrayLong &columns, XlYesNoGuess *header=NULL)
 Removes duplicate values from a range of values. More...
 
void RemoveSubtotal ()
 Removes subtotals from a list. More...
 
wxExcelRange RowDifferences (wxExcelRange comparison)
 Returns a Range Represents all the cells whose contents are different from those of the comparison cell in each row. More...
 
bool Select ()
 Selects the object. More...
 
bool Show ()
 Scrolls through the contents of the active window to move the range into view. More...
 
bool ShowDependents (wxXlTribool remove=wxDefaultXlTribool)
 Draws tracer arrows to the direct dependents of the range. More...
 
wxExcelRange ShowErrors ()
 Draws tracer arrows through the precedents tree to the cell that's the source of the error, and returns the range that contains that cell. More...
 
bool ShowPrecedents (wxXlTribool remove=wxDefaultXlTribool)
 Draws tracer arrows to the direct precedents of the range. More...
 
wxExcelRange SpecialCells (XlCellType type, const wxVariant &value=wxNullVariant)
 Returns a Range Represents all the cells that match the specified type and value. More...
 
bool Subtotal (XlConsolidationFunction groupBy, XlConsolidationFunction function, wxArrayLong &totalList, wxXlTribool replace=wxDefaultXlTribool, wxXlTribool pageBreaks=wxDefaultXlTribool, XlSummaryRow *summaryBelowData=NULL)
 Creates subtotals for the range (or the current region, if the range is a single cell). More...
 
void Table (wxExcelRange *rowInput=NULL, wxExcelRange *columnInput=NULL)
 Creates a data table based on input values and formulas that you define on a worksheet. More...
 
bool Ungroup ()
 Promotes a range in an outline (that is, decreases its outline level). More...
 
bool UnMerge ()
 Separates a merged area into individual cells. More...
 
bool GetAddIndent ()
 True if text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.); MSDN documentation for Range.AddIndent. More...
 
void SetAddIndent (bool addIndent)
 True if text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.); MSDN documentation for Range.AddIndent. More...
 
wxString GetAddress (wxXlTribool rowAbsolute=wxDefaultXlTribool, wxXlTribool columnAbsolute=wxDefaultXlTribool, XlReferenceStyle *referenceStyle=NULL, wxXlTribool external=wxDefaultXlTribool, wxExcelRange *relativeTo=NULL)
 Returns a value that represents the range reference in the language of the macro. More...
 
wxString GetAddressLocal (wxXlTribool rowAbsolute=wxDefaultXlTribool, wxXlTribool columnAbsolute=wxDefaultXlTribool, XlReferenceStyle *referenceStyle=NULL, wxXlTribool external=wxDefaultXlTribool, wxExcelRange *relativeTo=NULL)
 Returns the range reference for the specified range in the language of the user. More...
 
bool GetAllowEdit ()
 True if the range can be edited on a protected worksheet. More...
 
wxExcelAreas GetAreas ()
 Returns an Areas collection that represents all the ranges in a multiple-area selection. More...
 
wxExcelBorders GetBorders ()
 Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format). More...
 
wxExcelCharacters GetCharacters (long start=1, long *length=NULL)
 Returns a Characters Represents a range of characters within the object text. More...
 
long GetColumn ()
 Returns the number of the first column in the first area in the specified range. More...
 
double GetColumnWidth ()
 If all columns in the range have same width returns the width in points else returns -1. More...
 
void SetColumnWidth (double colWidth)
 Sets the column width for all the columns in the range. More...
 
wxExcelComment GetComment ()
 Returns a comment associated with the cell in the upper-left corner of the range. More...
 
wxExcelCommentThreaded GetCommentThreaded ()
 Returns a CommentThreaded object that represents the threaded comment associated with the cell in the upper-left corner of the range. More...
 
long GetCount ()
 Returns a value that represents the number of cells in the range. More...
 
wxLongLong GetCountLarge ()
 Returns a value that represents the number of cells in the range. More...
 
wxExcelRange GetCurrentArray ()
 If the specified cell is part of an array, returns a Range Represents the entire array. More...
 
wxExcelRange GetCurrentRegion ()
 Returns a Range Represents the current region. More...
 
wxExcelRange GetDependents ()
 Returns a Range Represents the range containing all the dependents of a cell. More...
 
wxExcelRange GetDirectDependents ()
 Returns a Range Represents the range containing all the direct dependents of a cell. More...
 
wxExcelRange GetDirectPrecedents ()
 Returns a Range Represents the range containing all the direct precedents of a cell. More...
 
wxExcelRange GetEnd (XlDirection direction)
 Returns a Range Represents the cell at the end of the region that contains the source range. More...
 
wxExcelRange GetEntireColumn ()
 Returns a Range Represents the entire column (or columns) that contains the specified range. More...
 
wxExcelRange GetEntireRow ()
 Returns a Range Represents the entire row (or rows) that contains the specified range. More...
 
wxExcelErrors GetErrors ()
 Allows the user to to access error checking options. More...
 
wxExcelFont GetFont ()
 Returns a Font Represents the font of the specified object. More...
 
wxExcelFormatConditions GetFormatConditions ()
 Returns a FormatConditions collection that represents all the conditional formats for the specified range. More...
 
wxString GetFormula ()
 Returns a value that represents the object's formula in A1-style notation and in the language of the macro. More...
 
void SetFormula (const wxString &formula)
 Sets a value that represents the object's formula in A1-style notation and in the language of the macro. More...
 
wxString GetFormulaArray ()
 Returns the array formula of a range. More...
 
void SetFormulaArray (const wxString &formula)
 Sets the array formula of a range. More...
 
wxXlTribool GetFormulaHidden ()
 Whether the formula will be hidden when the worksheet is protected. More...
 
void SetFormulaHidden (const bool hidden)
 True if the formula will be hidden when the worksheet is protected. More...
 
wxString GetFormulaLocal ()
 Returns the formula for the object, using A1-style references in the language of the user. More...
 
void SetFormulaLocal (const wxString &formulaLocal)
 Sets the formula for the object, using A1-style references in the language of the user. More...
 
wxString GetFormulaR1C1 ()
 Returns the formula for the object, using R1C1-style notation in the language of the macro. More...
 
void SetFormulaR1C1 (const wxString &formulaR1C1)
 Sets the formula for the object, using R1C1-style notation in the language of the macro. More...
 
wxString GetFormulaR1C1Local ()
 Returns the formula for the object, using R1C1-style notation in the language of the user. More...
 
void SetFormulaR1C1Local (const wxString &formulaR1C1Local)
 Sets the formula for the object, using R1C1-style notation in the language of the user. More...
 
wxXlTribool GetHasArray ()
 True if the specified cell is part of an array formula. More...
 
wxXlTribool GetHasFormula ()
 Returns tb_true if all cells in the range contain formulas, tb_false if none of the cells in the range contains a formula, and tb_default otherwise. More...
 
double GetHeight ()
 The range height in points. More...
 
void SetHeight (double height)
 The range height in points. More...
 
bool GetHidden ()
 If true the rows or columns are hidden. More...
 
void SetHidden (bool hidden)
 If true the rows or columns are hidden. More...
 
long GetHorizontalAlignment ()
 Horizontal alignment for the range. More...
 
void SetHorizontalAlignment (const long alignment)
 Horizontal alignment for the range. More...
 
wxExcelHyperlinks GetHyperlinks ()
 Returns a Hyperlinks collection that represents the hyperlinks for the range. More...
 
wxString GetID ()
 The identifying label for the specified cell when the page is saved as a Web page. More...
 
void SetID (const wxString &ID)
 The identifying label for the specified cell when the page is saved as a Web page. More...
 
long GetIndentLevel ()
 The indent level for the range. More...
 
void SetIndentLevel (long indentLevel)
 The indent level for the range. More...
 
wxExcelInterior GetInterior ()
 Returns an Interior Represents the interior of the range. More...
 
wxExcelRange GetItem (long rowIndex, long *columnIndex=NULL)
 Returns a Range Represents a range at an offset to the specified range. More...
 
double GetLeft ()
 Returns the distance, in points, from the left edge of column A to the left edge of the range. More...
 
long GetListHeaderRows ()
 Returns the number of header rows for the specified range. More...
 
wxExcelListObject GetListObject ()
 Returns a ListObject for Range. More...
 
XlLocationInTable GetLocationInTable ()
 Returns a constant that describes the part of the PivotTable report that contains the upper-left corner of the specified range. More...
 
wxXlTribool GetLocked ()
 Returns tb_true if all cells in the range are locked, tb_true if all cells in the range are unlocked, and tb_default is some cells are locked and some are not. More...
 
void SetLocked (bool locked)
 Sets a value that indicates if the object is locked. More...
 
wxString GetMDX ()
 Returns the MDX name for the specified Range object. More...
 
wxExcelRange GetMergeArea ()
 Returns a Range Represents the merged range containing the specified cell. More...
 
bool GetMergeCells ()
 True if the range contains merged cells. More...
 
wxExcelName GetName ()
 Returns the name of the object. More...
 
void SetName (const wxString &name)
 Sets the name of the object. More...
 
wxExcelRange GetNext ()
 Returns a range representing the next cell. More...
 
wxString GetNumberFormat ()
 Returns the format code for the range or an empty string if all the cells in range don't share the same format. More...
 
void SetNumberFormat (const wxString &numberFormat)
 Sets the format code for the range. More...
 
wxString GetNumberFormatLocal ()
 Returns the format code for the range as a string in the language of the user or an empty string if all the cells in range don't share the same format. More...
 
void SetNumberFormatLocal (const wxString &numberFormatLocal)
 Sets the format code for the range as a string in the language of the user. More...
 
wxExcelRange GetOffset (long rowOffset=0, long columnOffset=0)
 Returns a Range Represents a range that's offset from the specified range. More...
 
long GetOrientation ()
 Returns the text orientation. More...
 
void SetOrientation (long orientation)
 Sets the text orientation. More...
 
long GetOutlineLevel ()
 Returns the current outline level of the specified row or column. More...
 
void SetOutlineLevel (long outlineLevel)
 Sets the current outline level of the specified row or column. More...
 
XlPageBreak GetPageBreak ()
 Returns the location of a page break. More...
 
void SetPageBreak (XlPageBreak pageBreak)
 Sets the location of a page break. More...
 
wxExcelRange GetPrecedents ()
 MSDN documentation for Range.Precedents. More...
 
wxString GetPrefixCharacter ()
 Returns the prefix character for the cell. More...
 
wxExcelRange GetPrevious ()
 Returns a range represnting the next cell. More...
 
long GetReadingOrder ()
 Returns the reading order for the specified object. More...
 
wxExcelRange GetResize (long *rowSize=NULL, long *columnSize=NULL)
 Resizes the specified range. More...
 
long GetRow ()
 Returns the number of the first row of the first area in the range. More...
 
double GetRowHeight ()
 If all rows in the range have same height returns the height in points else returns -1. More...
 
void SetRowHeight (double rowHeight)
 Sets the height of all the rows in the range specified, measured in points. More...
 
bool GetShowDetail ()
 True if the outline is expanded for the specified range (so that the detail of the column or row is visible). More...
 
wxXlTribool GetShrinkToFit ()
 Returns tb_true if the text shrinks to fit into the cell in all cells in the range. More...
 
void SetShrinkToFit (bool shrinkToFit)
 Set true if the text is to fit into the cell. More...
 
wxExcelSparklineGroups GetSparklineGroups ()
 Returns a SparklineGroups object that represents an existing group of sparklines from the specified range. More...
 
wxExcelStyle GetStyle ()
 Returns the style of the range. More...
 
void SetStyle (wxExcelStyle style)
 Sets the style of the range. More...
 
bool GetSummary ()
 True if the range is an outlining summary row or column. More...
 
wxString GetText ()
 Returns the text value as seen by user in MS Excel. More...
 
double GetTop ()
 Returns the distance, in points, from the top edge of row 1 to the top edge of the range. More...
 
wxXlTribool GetUseStandardHeight ()
 Returns tb_true if the row height of the Range object equals the standard height of the sheet. More...
 
void SetUseStandardHeight (bool useStandardHeight)
 Whether all cells in the range should use standard row height of the sheet. More...
 
wxXlTribool GetUseStandardWidth ()
 Returns tb_true if the column width of the Range object equals the standard width of the sheet. More...
 
void SetUseStandardWidth (bool useStandardWidth)
 Whether all cells in the range should use standard column width of the sheet. More...
 
wxExcelValidation GetValidation ()
 Returns the Validation object that represents data validation for the specified range. More...
 
wxVariant GetValue ()
 Returns the value(s) of the specified range. More...
 
 operator wxVariant ()
 Same as calling GetValue();. More...
 
void SetValue (const wxVariant &value)
 Sets the value for a Range. More...
 
void operator= (const wxVariant &value)
 Same as calling SetValue();. More...
 
wxVariant GetValue2 ()
 Works almost like GetValue(), except that it returns DateTime and Currency as doubles and not their respective types. More...
 
void SetValue2 (const wxVariant &value)
 Sets the cell value. More...
 
long GetVerticalAlignment ()
 Returns the vertical alignment of the specified object. More...
 
void SetVerticalAlignment (long verticalAlignment)
 Sets the vertical alignment of the specified object. More...
 
double GetWidth ()
 Returns the width, in units, of the range. More...
 
wxExcelWorksheet GetWorksheet ()
 Returns the worksheet containing the specified range. More...
 
wxXlTribool GetWrapText ()
 Returns tb_true if all cells in the range wrap the text, tb_false if all cells in the range do not wrap the text, and tb_default if some cells wrap the text and some do not. More...
 
void SetWrapText (bool wrapText)
 Set to true if Microsoft Excel should wrap the text in the object in all cells in the range. More...
 
virtual wxString GetAutoExcelObjectName_ () const
 Returns "Range". More...
 
long GetConvertVariantFlags_ ()
 See wxAutomationObject::GetConvertVariantFlags() More...
 
bool SetConvertVariantFlags_ (long flags)
 This method, wrapping wxAutomationObject::SetConvertVariantFlags() can be very useful for efficient data transfer to/from Excel, using wxOleConvertVariant_ReturnSafeArrays as a value of flags, see bulkdata sample for an example. More...
 
- Public Member Functions inherited from wxAutoExcel::wxExcelRangeOwner
wxExcelRange GetCells (long *row=NULL, long *column=NULL)
 wxExcelApplication: Returns a Range representing all the cells on the active worksheet. More...
 
wxExcelRange GetRange (const wxString &cell1, const wxString &cell2=wxEmptyString)
 wxExcelWorksheet: Returns a Range representing a cell or a range of cells. More...
 
wxExcelRange GetRows ()
 wxExcelWorksheet: Returns a Range representing all the rows on the specified worksheet. More...
 
wxExcelRange GetRows (long rowIndex)
 wxExcelRange: Returns a Range containing just one row with rowIndex (starting with 1). More...
 
wxExcelRange GetRows (const wxString &rowRange)
 wxExcelWorksheet: Returns a Range that can contain several contiguous rows. More...
 
wxExcelRange GetColumns ()
 wxExcelWorksheet: Returns a Range representing all the columns on the active worksheet. More...
 
wxExcelRange GetColumns (long columnIndex)
 wxExcelRange: Returns a Range containing just one column with columnIndex (starting with 1). More...
 
wxExcelRange GetColumns (const wxString &columnRange)
 wxExcelWorksheet: Returns a Range that can contain several contiguous columns. More...
 
- Public Member Functions inherited from wxAutoExcel::wxExcelObject
bool IsOk_ () const
 Returns true if the object has a valid dispatch. More...
 
wxString GetAutomationObjectName_ (bool stripUnderscores=false) const
 Returns object name as provided by IDispatch->GetTypeInfo()->GetDocumentation(MEMBERID_NIL, &name, NULL, NULL, NULL). More...
 
wxSharedPtr< wxAutomationObject > GetAutomationObject_ ()
 Returns the underlying wxAutomationObject. More...
 
 operator bool () const
 Returns true if the object has a valid dispatch and its last automation call (if any), i.e. More...
 
WXLCID GetAutomationLCID_ () const
 Returns the locale identifier used in automation calls. More...
 
bool SetAutomationLCID_ (WXLCID lcid)
 Sets the locale identifier to be used in automation calls. More...
 
bool GetPropertyAndMethodNames_ (wxArrayString &propertyNames, wxArrayString &methodNames, bool includeHidden=false)
 Returns lists of property and method names the automation interface exposes. More...
 
bool GetUnimplementedObject_ (const wxString &name, wxAutomationObject &object)
 Helper function for receiving an automation object not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Additional Inherited Members

- Public Types inherited from wxAutoExcel::wxExcelObject
enum  ErrorFlags {
  Err_DoNothing = 0 , Err_LogOnInvalidDispatch = 1 , Err_AssertOnInvalidDispatch = 1 << 1 , Err_ThrowOnInvalidDispatch = 1 << 2 ,
  Err_LogOnInvalidArgument = 1 << 3 , Err_AssertOnInvalidArgument = 1 << 4 , Err_ThrowOnInvalidArgument = 1 << 5 , Err_LogOnFailedInvoke = 1 << 6 ,
  Err_AssertOnFailedInvoke = 1 << 7 , Err_ThrowOnFailedInvoke = 1 << 8 , Err_LogOnInvalidReturnType = 1 << 9 , Err_AssertOnInvalidReturnType = 1 << 10 ,
  Err_ThrowOnInvalidReturnType = 1 << 11 , Err_LogOnOtherError = 1 << 12 , Err_AssertOnOtherError = 1 << 13 , Err_ThrowOnOtherError = 1 << 14
}
 Flags affecting the behaviour of wxExcelObject and its descendants when an error occurs during accessing an Excel object property or calling its method. More...
 
- Static Public Member Functions inherited from wxAutoExcel::wxExcelObject
static unsigned GetErrorMode_ ()
 Sets the error mode to the combination of wxExcelObject::ErrorFlags. More...
 
static void SetErrorMode_ (unsigned mode)
 Sets the error mode as the combination of wxExcelObject::ErrorFlags. More...
 
static bool GetUnimplementedCollectionItem_ (wxAutomationObject &collection, const long index, wxAutomationObject &item, bool asProperty)
 Helper function for obtaining an item from MS Excel collection not implemented in wxAutoExcel, see FAQ on how to use. More...
 

Detailed Description

Represents Microsoft Excel Range, i.e.

a collection of cells.

Member Function Documentation

◆ Activate()

bool wxAutoExcel::wxExcelRange::Activate ( )

Activates a single cell, which must be inside the current selection.

To select a range of cells, use the Select method.

MSDN documentation for Range.Activate.

◆ AddComment()

wxExcelComment wxAutoExcel::wxExcelRange::AddComment ( const wxString &  text = wxEmptyString)

Adds a comment to the range.

MSDN documentation for Range.AddComment.

◆ AdvancedFilter()

bool wxAutoExcel::wxExcelRange::AdvancedFilter ( enum XlFilterAction  action,
wxExcelRange criteriaRange = NULL,
wxExcelRange copyToRange = NULL,
wxXlTribool  unique = wxDefaultXlTribool 
)

Filters or copies data from a list based on a criteria range.

If the initial selection is a single cell, that cell's current region is used.

MSDN documentation for Range.AdvancedFilter.

◆ AllocateChanges()

void wxAutoExcel::wxExcelRange::AllocateChanges ( )

Performs a writeback operation for all edited cells in a range based on an OLAP data source.

Since Excel 2010.

MSDN documentation for Range.AllocateChanges.

◆ ApplyNames()

void wxAutoExcel::wxExcelRange::ApplyNames ( wxArrayString *  names = NULL,
wxXlTribool  ignoreRelativeAbsolute = NULL,
wxXlTribool  useRowColumnNames = wxDefaultXlTribool,
wxXlTribool  omitColumn = wxDefaultXlTribool,
wxXlTribool  omitRow = wxDefaultXlTribool,
XlApplyNamesOrder order = NULL,
wxXlTribool  appendLast = wxDefaultXlTribool 
)

Applies names to the cells in the specified range.

MSDN documentation for Range.ApplyNames.

◆ ApplyOutlineStyles()

void wxAutoExcel::wxExcelRange::ApplyOutlineStyles ( )

Applies outlining styles to the specified range.

MSDN documentation for Range.ApplyOutlineStyles.

◆ AutoComplete()

wxString wxAutoExcel::wxExcelRange::AutoComplete ( const wxString &  str)

Returns an AutoComplete match from the list.

If there's no AutoComplete match or if more than one entry in the list matches the string to complete, this method returns an empty string.

MSDN documentation for Range.AutoComplete.

◆ AutoFill()

bool wxAutoExcel::wxExcelRange::AutoFill ( wxExcelRange  destination,
XlAutoFillType type = NULL 
)

Performs an autofill on the cells in the specified range.

MSDN documentation for Range.AutoFill.

◆ AutoFilter()

bool wxAutoExcel::wxExcelRange::AutoFilter ( long *  field = NULL,
const wxString &  criteria1 = wxEmptyString,
XlAutoFilterOperator oper = NULL,
const wxString &  criteria2 = wxEmptyString,
wxXlTribool  visibleDropDown = wxDefaultXlTribool 
)

Filters a list using the AutoFilter.

MSDN documentation for Range.AutoFilter.

◆ AutoFit()

bool wxAutoExcel::wxExcelRange::AutoFit ( )

Changes the width of the columns in the range or the height of the rows in the range to achieve the best fit.

MSDN documentation for Range.AutoFit.

◆ AutoOutline()

void wxAutoExcel::wxExcelRange::AutoOutline ( )

Automatically creates an outline for the specified range.

If the range is a single cell, Microsoft Excel creates an outline for the entire sheet. The new outline replaces any existing outline.

MSDN documentation for Range.AutoOutline.

◆ BorderAround()

bool wxAutoExcel::wxExcelRange::BorderAround ( XlLineStyle lineStyle = NULL,
XlBorderWeight weight = NULL,
long *  colorIndex = NULL,
const wxColour *  color = NULL 
)

Adds a border to a range and sets the Color, LineStyle, and Weight properties for the new border.

MSDN documentation for Range.BorderAround.

◆ Calculate()

void wxAutoExcel::wxExcelRange::Calculate ( )

◆ CalculateRowMajorOrder()

void wxAutoExcel::wxExcelRange::CalculateRowMajorOrder ( )

Calculates the range the same way Excel 2000 and earlier did.

MSDN documentation for Range.CalculateRowMajorOrder.

◆ CheckSpelling()

void wxAutoExcel::wxExcelRange::CheckSpelling ( const wxString &  customDictionary = wxEmptyString,
wxXlTribool  ignoreUpperCase = wxDefaultXlTribool,
wxXlTribool  alwaysSuggest = wxDefaultXlTribool,
MsoLanguageID spellLang = NULL 
)

Checks the spelling of an object.

MSDN documentation for Range.CheckSpelling.

◆ Clear()

bool wxAutoExcel::wxExcelRange::Clear ( )

Clears the entire object.

MSDN documentation for Range.Clear.

◆ ClearComments()

bool wxAutoExcel::wxExcelRange::ClearComments ( )

Clears all cell comments from the specified range.

MSDN documentation for Range.ClearComments.

◆ ClearContents()

bool wxAutoExcel::wxExcelRange::ClearContents ( )

Clears the formulas from the range.

MSDN documentation for Range.ClearContents.

◆ ClearFormats()

bool wxAutoExcel::wxExcelRange::ClearFormats ( )

Clears the formatting of the object.

MSDN documentation for Range.ClearFormats.

◆ ClearHyperlinks()

bool wxAutoExcel::wxExcelRange::ClearHyperlinks ( )

Removes all hyperlinks from the specified range.

Since Excel 2010.

MSDN documentation for Range.ClearHyperlinks.

◆ ClearNotes()

bool wxAutoExcel::wxExcelRange::ClearNotes ( )

Clears notes and sound notes from all the cells in the specified range.

MSDN documentation for Range.ClearNotes.

◆ ClearOutline()

bool wxAutoExcel::wxExcelRange::ClearOutline ( )

Clears the outline for the specified range.

MSDN documentation for Range.ClearOutline.

◆ ColumnDifferences()

wxExcelRange wxAutoExcel::wxExcelRange::ColumnDifferences ( wxExcelRange  comparison)

Returns a Range Represents all the cells whose contents are different from the comparison cell in each column.

MSDN documentation for Range.ColumnDifferences.

◆ Copy()

bool wxAutoExcel::wxExcelRange::Copy ( const wxExcelRange destination = NULL)

Copies the range to the specified range or to the Clipboard.

MSDN documentation for Range.Copy.

◆ CopyPicture()

bool wxAutoExcel::wxExcelRange::CopyPicture ( XlPictureAppearance appearance = NULL,
XlCopyPictureFormat format = NULL 
)

Copies the selected object to the Clipboard as a picture.

MSDN documentation for Range.CopyPicture.

◆ CreateNames()

bool wxAutoExcel::wxExcelRange::CreateNames ( wxXlTribool  top = wxDefaultXlTribool,
wxXlTribool  left = wxDefaultXlTribool,
wxXlTribool  bottom = wxDefaultXlTribool,
wxXlTribool  right = wxDefaultXlTribool 
)

Creates names in the specified range, based on text labels in the sheet.

MSDN documentation for Range.CreateNames.

◆ Cut()

bool wxAutoExcel::wxExcelRange::Cut ( const wxExcelRange destination = NULL)

Cuts the object to the Clipboard or pastes it into a specified destination.

MSDN documentation for Range.Cut.

◆ DataSeries()

bool wxAutoExcel::wxExcelRange::DataSeries ( XlRowCol rowCol = NULL,
XlDataSeriesType type = NULL,
XlDataSeriesDate date = NULL,
long *  step = NULL,
const wxVariant &  stop = wxNullVariant,
wxXlTribool  trend = wxDefaultXlTribool 
)

Creates a data series in the specified range.

MSDN documentation for Range.DataSeries.

◆ Delete()

bool wxAutoExcel::wxExcelRange::Delete ( XlDeleteShiftDirection shift = NULL)

◆ Dirty()

void wxAutoExcel::wxExcelRange::Dirty ( )

Designates a range to be recalculated when the next recalculation occurs.

MSDN documentation for Range.Dirty.

◆ DiscardChanges()

void wxAutoExcel::wxExcelRange::DiscardChanges ( )

Discards all changes in the edited cells of the range.

Since Excel 2010.

MSDN documentation for Range.DiscardChanges.

◆ ExportAsFixedFormat()

void wxAutoExcel::wxExcelRange::ExportAsFixedFormat ( XlFixedFormatType  type,
const wxString &  fileName = wxEmptyString,
XlFixedFormatQuality quality = NULL,
wxXlTribool  includeDocProperties = wxDefaultXlTribool,
wxXlTribool  ignorePrintAreas = wxDefaultXlTribool,
long *  from = NULL,
long *  to = NULL,
wxXlTribool  openAfterPublish = wxDefaultXlTribool 
)

Exports to an XPS or PDF file.

MSDN documentation for Range.ExportAsFixedFormat.

◆ FillDown()

bool wxAutoExcel::wxExcelRange::FillDown ( )

Fills down from the top cell or cells in the specified range to the bottom of the range.

The contents and formatting of the cell or cells in the top row of a range are copied into the rest of the rows in the range.

MSDN documentation for Range.FillDown.

◆ FillLeft()

bool wxAutoExcel::wxExcelRange::FillLeft ( )

Fills left from the rightmost cell or cells in the specified range.

The contents and formatting of the cell or cells in the rightmost column of a range are copied into the rest of the columns in the range.

MSDN documentation for Range.FillLeft.

◆ FillRight()

bool wxAutoExcel::wxExcelRange::FillRight ( )

Fills right from the leftmost cell or cells in the specified range.

The contents and formatting of the cell or cells in the leftmost column of a range are copied into the rest of the columns in the range.

MSDN documentation for Range.FillRight.

◆ FillUp()

bool wxAutoExcel::wxExcelRange::FillUp ( )

Fills up from the bottom cell or cells in the specified range to the top of the range.

The contents and formatting of the cell or cells in the bottom row of a range are copied into the rest of the rows in the range.

MSDN documentation for Range.FillUp.

◆ FlashFill()

void wxAutoExcel::wxExcelRange::FlashFill ( )

Flash Fill automatically fills the data when it senses a pattern.

Excel VBA documentation for Range.FlashFill

◆ FunctionWizard()

void wxAutoExcel::wxExcelRange::FunctionWizard ( )

Starts the Function Wizard for the upper-left cell of the range.

MSDN documentation for Range.FunctionWizard.

◆ Insert()

bool wxAutoExcel::wxExcelRange::Insert ( XlInsertShiftDirection shift)

Inserts a cell or a range of cells into the worksheet or macro sheet and shifts other cells away to make space.

MSDN documentation for Range.Insert.

◆ InsertIndent()

void wxAutoExcel::wxExcelRange::InsertIndent ( long  insertAmount)

Adds an indent to the specified range.

MSDN documentation for Range.InsertIndent.

◆ Justify()

bool wxAutoExcel::wxExcelRange::Justify ( )

Rearranges the text in a range so that it fills the range evenly.

MSDN documentation for Range.Justify.

◆ ListNames()

bool wxAutoExcel::wxExcelRange::ListNames ( )

Pastes a list of all nonhidden names onto the worksheet, beginning with the first cell in the range.

MSDN documentation for Range.ListNames.

◆ Merge()

void wxAutoExcel::wxExcelRange::Merge ( wxXlTribool  across = wxDefaultXlTribool)

Creates a merged cell from the specified Range object.

MSDN documentation for Range.Merge.

◆ NavigateArrow()

bool wxAutoExcel::wxExcelRange::NavigateArrow ( wxXlTribool  towardPrecedent = wxDefaultXlTribool,
long *  arrowNumber = NULL,
long *  linkNumber = NULL 
)

Navigates a tracer arrow for the specified range to the precedent, dependent, or error-causing cell or cells.

Selects the precedent, dependent, or error cells and returns a Range Represents the new selection. This method causes an error if it's applied to a cell without visible tracer arrows.

MSDN documentation for Range.NavigateArrow.

◆ PasteSpecial()

bool wxAutoExcel::wxExcelRange::PasteSpecial ( XlPasteType paste = NULL,
XlPasteSpecialOperation operation = NULL,
wxXlTribool  skipBlanks = wxDefaultXlTribool,
wxXlTribool  transpose = wxDefaultXlTribool 
)

Pastes a Range from the Clipboard into the specified range.

MSDN documentation for Range.PasteSpecial.

◆ PrintOut()

bool wxAutoExcel::wxExcelRange::PrintOut ( long *  from = NULL,
long *  to = NULL,
long *  copies = NULL,
wxXlTribool  preview = wxDefaultXlTribool,
const wxString &  activePrinter = wxEmptyString,
wxXlTribool  printToFile = wxDefaultXlTribool,
wxXlTribool  collate = wxDefaultXlTribool,
const wxString &  prToFileName = wxEmptyString 
)

◆ PrintPreview()

bool wxAutoExcel::wxExcelRange::PrintPreview ( wxXlTribool  enableChanges = wxDefaultXlTribool)

Shows a preview of the object as it would look when printed.

MSDN documentation for Range.PrintPreview.

◆ RemoveDuplicates()

void wxAutoExcel::wxExcelRange::RemoveDuplicates ( const wxArrayLong &  columns,
XlYesNoGuess header = NULL 
)

Removes duplicate values from a range of values.

MSDN documentation for Range.RemoveDuplicates.

◆ RemoveSubtotal()

void wxAutoExcel::wxExcelRange::RemoveSubtotal ( )

Removes subtotals from a list.

MSDN documentation for Range.RemoveSubtotal.

◆ RowDifferences()

wxExcelRange wxAutoExcel::wxExcelRange::RowDifferences ( wxExcelRange  comparison)

Returns a Range Represents all the cells whose contents are different from those of the comparison cell in each row.

MSDN documentation for Range.RowDifferences.

◆ Select()

bool wxAutoExcel::wxExcelRange::Select ( )

◆ Show()

bool wxAutoExcel::wxExcelRange::Show ( )

Scrolls through the contents of the active window to move the range into view.

The range must consist of a single cell in the active document.

MSDN documentation for Range.Show.

◆ ShowDependents()

bool wxAutoExcel::wxExcelRange::ShowDependents ( wxXlTribool  remove = wxDefaultXlTribool)

Draws tracer arrows to the direct dependents of the range.

MSDN documentation for Range.ShowDependents.

◆ ShowErrors()

wxExcelRange wxAutoExcel::wxExcelRange::ShowErrors ( )

Draws tracer arrows through the precedents tree to the cell that's the source of the error, and returns the range that contains that cell.

MSDN documentation for Range.ShowErrors.

◆ ShowPrecedents()

bool wxAutoExcel::wxExcelRange::ShowPrecedents ( wxXlTribool  remove = wxDefaultXlTribool)

Draws tracer arrows to the direct precedents of the range.

MSDN documentation for Range.ShowPrecedents.

◆ SpecialCells()

wxExcelRange wxAutoExcel::wxExcelRange::SpecialCells ( XlCellType  type,
const wxVariant &  value = wxNullVariant 
)

Returns a Range Represents all the cells that match the specified type and value.

MSDN documentation for Range.SpecialCells.

◆ Subtotal()

bool wxAutoExcel::wxExcelRange::Subtotal ( XlConsolidationFunction  groupBy,
XlConsolidationFunction  function,
wxArrayLong &  totalList,
wxXlTribool  replace = wxDefaultXlTribool,
wxXlTribool  pageBreaks = wxDefaultXlTribool,
XlSummaryRow summaryBelowData = NULL 
)

Creates subtotals for the range (or the current region, if the range is a single cell).

MSDN documentation for Range.Subtotal.

◆ Table()

void wxAutoExcel::wxExcelRange::Table ( wxExcelRange rowInput = NULL,
wxExcelRange columnInput = NULL 
)

Creates a data table based on input values and formulas that you define on a worksheet.

MSDN documentation for Range.Table.

◆ Ungroup()

bool wxAutoExcel::wxExcelRange::Ungroup ( )

Promotes a range in an outline (that is, decreases its outline level).

The specified range must be a row or column, or a range of rows or columns. If the range is in a PivotTable report, this method ungroups the items contained in the range.

MSDN documentation for Range.Ungroup.

◆ UnMerge()

bool wxAutoExcel::wxExcelRange::UnMerge ( )

Separates a merged area into individual cells.

MSDN documentation for Range.UnMerge.

◆ GetAddIndent()

bool wxAutoExcel::wxExcelRange::GetAddIndent ( )

True if text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.); MSDN documentation for Range.AddIndent.

◆ SetAddIndent()

void wxAutoExcel::wxExcelRange::SetAddIndent ( bool  addIndent)

True if text is automatically indented when the text alignment in a cell is set to equal distribution (either horizontally or vertically.); MSDN documentation for Range.AddIndent.

◆ GetAddress()

wxString wxAutoExcel::wxExcelRange::GetAddress ( wxXlTribool  rowAbsolute = wxDefaultXlTribool,
wxXlTribool  columnAbsolute = wxDefaultXlTribool,
XlReferenceStyle referenceStyle = NULL,
wxXlTribool  external = wxDefaultXlTribool,
wxExcelRange relativeTo = NULL 
)

Returns a value that represents the range reference in the language of the macro.

MSDN documentation for Range.Address.

◆ GetAddressLocal()

wxString wxAutoExcel::wxExcelRange::GetAddressLocal ( wxXlTribool  rowAbsolute = wxDefaultXlTribool,
wxXlTribool  columnAbsolute = wxDefaultXlTribool,
XlReferenceStyle referenceStyle = NULL,
wxXlTribool  external = wxDefaultXlTribool,
wxExcelRange relativeTo = NULL 
)

Returns the range reference for the specified range in the language of the user.

MSDN documentation for Range.AddressLocal.

◆ GetAllowEdit()

bool wxAutoExcel::wxExcelRange::GetAllowEdit ( )

True if the range can be edited on a protected worksheet.

MSDN documentation for Range.AllowEdit.

◆ GetAreas()

wxExcelAreas wxAutoExcel::wxExcelRange::GetAreas ( )

Returns an Areas collection that represents all the ranges in a multiple-area selection.

MSDN documentation for Range.Areas.

◆ GetBorders()

wxExcelBorders wxAutoExcel::wxExcelRange::GetBorders ( )

Returns a Borders collection that represents the borders of a style or a range of cells (including a range defined as part of a conditional format).

MSDN documentation for Range.Borders.

◆ GetCharacters()

wxExcelCharacters wxAutoExcel::wxExcelRange::GetCharacters ( long  start = 1,
long *  length = NULL 
)

Returns a Characters Represents a range of characters within the object text.

You can use the Characters object to format characters within a text string.

MSDN documentation for Range.Characters.

◆ GetColumn()

long wxAutoExcel::wxExcelRange::GetColumn ( )

Returns the number of the first column in the first area in the specified range.

MSDN documentation for Range.Column.

◆ GetColumnWidth()

double wxAutoExcel::wxExcelRange::GetColumnWidth ( )

If all columns in the range have same width returns the width in points else returns -1.

Returns -2 on error.

MSDN documentation for Range.ColumnWidth.

◆ SetColumnWidth()

void wxAutoExcel::wxExcelRange::SetColumnWidth ( double  colWidth)

Sets the column width for all the columns in the range.

MSDN documentation for Range.ColumnWidth.

◆ GetComment()

wxExcelComment wxAutoExcel::wxExcelRange::GetComment ( )

Returns a comment associated with the cell in the upper-left corner of the range.

MSDN documentation for Range.Comment.

◆ GetCommentThreaded()

wxExcelCommentThreaded wxAutoExcel::wxExcelRange::GetCommentThreaded ( )

Returns a CommentThreaded object that represents the threaded comment associated with the cell in the upper-left corner of the range.

MSDN documentation for Range.CommentThreaded.

◆ GetCount()

long wxAutoExcel::wxExcelRange::GetCount ( )

Returns a value that represents the number of cells in the range.

MSDN documentation for Range.Count.

◆ GetCountLarge()

wxLongLong wxAutoExcel::wxExcelRange::GetCountLarge ( )

Returns a value that represents the number of cells in the range.

Since Excel 2007.

MSDN documentation for Range.CountLarge.

◆ GetCurrentArray()

wxExcelRange wxAutoExcel::wxExcelRange::GetCurrentArray ( )

If the specified cell is part of an array, returns a Range Represents the entire array.

MSDN documentation for Range.CurrentArray.

◆ GetCurrentRegion()

wxExcelRange wxAutoExcel::wxExcelRange::GetCurrentRegion ( )

Returns a Range Represents the current region.

The current region is a range bounded by any combination of blank rows and blank columns.

MSDN documentation for Range.CurrentRegion.

◆ GetDependents()

wxExcelRange wxAutoExcel::wxExcelRange::GetDependents ( )

Returns a Range Represents the range containing all the dependents of a cell.

This can be a multiple selection (a union of Range objects) if there's more than one dependent.

MSDN documentation for Range.Dependents.

◆ GetDirectDependents()

wxExcelRange wxAutoExcel::wxExcelRange::GetDirectDependents ( )

Returns a Range Represents the range containing all the direct dependents of a cell.

This can be a multiple selection (a union of Range objects) if there's more than one dependent.

MSDN documentation for Range.DirectDependents.

◆ GetDirectPrecedents()

wxExcelRange wxAutoExcel::wxExcelRange::GetDirectPrecedents ( )

Returns a Range Represents the range containing all the direct precedents of a cell.

This can be a multiple selection (a union of Range objects) if there's more than one precedent.

MSDN documentation for Range.DirectPrecedents.

◆ GetEnd()

wxExcelRange wxAutoExcel::wxExcelRange::GetEnd ( XlDirection  direction)

Returns a Range Represents the cell at the end of the region that contains the source range.

Equivalent to pressing END+UP ARROW, END+DOWN ARROW, END+LEFT ARROW, or END+RIGHT ARROW.

MSDN documentation for Range.End.

◆ GetEntireColumn()

wxExcelRange wxAutoExcel::wxExcelRange::GetEntireColumn ( )

Returns a Range Represents the entire column (or columns) that contains the specified range.

MSDN documentation for Range.EntireColumn.

◆ GetEntireRow()

wxExcelRange wxAutoExcel::wxExcelRange::GetEntireRow ( )

Returns a Range Represents the entire row (or rows) that contains the specified range.

MSDN documentation for Range.EntireRow.

◆ GetErrors()

wxExcelErrors wxAutoExcel::wxExcelRange::GetErrors ( )

Allows the user to to access error checking options.

MSDN documentation for Range.Errors.

◆ GetFont()

wxExcelFont wxAutoExcel::wxExcelRange::GetFont ( )

Returns a Font Represents the font of the specified object.

MSDN documentation for Range.Font.

◆ GetFormatConditions()

wxExcelFormatConditions wxAutoExcel::wxExcelRange::GetFormatConditions ( )

Returns a FormatConditions collection that represents all the conditional formats for the specified range.

MSDN documentation for Range.FormatConditions.

◆ GetFormula()

wxString wxAutoExcel::wxExcelRange::GetFormula ( )

Returns a value that represents the object's formula in A1-style notation and in the language of the macro.

MSDN documentation for Range.Formula.

◆ SetFormula()

void wxAutoExcel::wxExcelRange::SetFormula ( const wxString &  formula)

Sets a value that represents the object's formula in A1-style notation and in the language of the macro.

MSDN documentation for Range.Formula.

◆ GetFormulaArray()

wxString wxAutoExcel::wxExcelRange::GetFormulaArray ( )

Returns the array formula of a range.

Returns (or can be set to) a single formula or a Visual Basic array. If the specified range doesn't contain an array formula, this property returns null.

MSDN documentation for Range.FormulaArray.

◆ SetFormulaArray()

void wxAutoExcel::wxExcelRange::SetFormulaArray ( const wxString &  formula)

Sets the array formula of a range.

MSDN documentation for Range.FormulaArray.

◆ GetFormulaHidden()

wxXlTribool wxAutoExcel::wxExcelRange::GetFormulaHidden ( )

Whether the formula will be hidden when the worksheet is protected.

Returns tb_true if all cells in the range have this property set to true, tb_false if all cells in the range have this property set to false, and tb_default if the value of this property is not same for all cells in the range.

MSDN documentation for Range.FormulaHidden.

◆ SetFormulaHidden()

void wxAutoExcel::wxExcelRange::SetFormulaHidden ( const bool  hidden)

True if the formula will be hidden when the worksheet is protected.

MSDN documentation for Range.FormulaHidden.

◆ GetFormulaLocal()

wxString wxAutoExcel::wxExcelRange::GetFormulaLocal ( )

Returns the formula for the object, using A1-style references in the language of the user.

MSDN documentation for Range.FormulaLocal.

◆ SetFormulaLocal()

void wxAutoExcel::wxExcelRange::SetFormulaLocal ( const wxString &  formulaLocal)

Sets the formula for the object, using A1-style references in the language of the user.

MSDN documentation for Range.FormulaLocal.

◆ GetFormulaR1C1()

wxString wxAutoExcel::wxExcelRange::GetFormulaR1C1 ( )

Returns the formula for the object, using R1C1-style notation in the language of the macro.

MSDN documentation for Range.FormulaR1C1.

◆ SetFormulaR1C1()

void wxAutoExcel::wxExcelRange::SetFormulaR1C1 ( const wxString &  formulaR1C1)

Sets the formula for the object, using R1C1-style notation in the language of the macro.

MSDN documentation for Range.FormulaR1C1.

◆ GetFormulaR1C1Local()

wxString wxAutoExcel::wxExcelRange::GetFormulaR1C1Local ( )

Returns the formula for the object, using R1C1-style notation in the language of the user.

MSDN documentation for Range.FormulaR1C1Local.

◆ SetFormulaR1C1Local()

void wxAutoExcel::wxExcelRange::SetFormulaR1C1Local ( const wxString &  formulaR1C1Local)

Sets the formula for the object, using R1C1-style notation in the language of the user.

MSDN documentation for Range.FormulaR1C1Local.

◆ GetHasArray()

wxXlTribool wxAutoExcel::wxExcelRange::GetHasArray ( )

True if the specified cell is part of an array formula.

MSDN documentation for Range.HasArray.

◆ GetHasFormula()

wxXlTribool wxAutoExcel::wxExcelRange::GetHasFormula ( )

Returns tb_true if all cells in the range contain formulas, tb_false if none of the cells in the range contains a formula, and tb_default otherwise.

MSDN documentation for Range.HasFormula.

◆ GetHeight()

double wxAutoExcel::wxExcelRange::GetHeight ( )

The range height in points.

MSDN documentation for Range.Height.

◆ SetHeight()

void wxAutoExcel::wxExcelRange::SetHeight ( double  height)

The range height in points.

MSDN documentation for Range.Height.

◆ GetHidden()

bool wxAutoExcel::wxExcelRange::GetHidden ( )

If true the rows or columns are hidden.

The range must span entire row or column.

MSDN documentation for Range.Hidden.

◆ SetHidden()

void wxAutoExcel::wxExcelRange::SetHidden ( bool  hidden)

If true the rows or columns are hidden.

The range must span entire row or column.

MSDN documentation for Range.Hidden.

◆ GetHorizontalAlignment()

long wxAutoExcel::wxExcelRange::GetHorizontalAlignment ( )

Horizontal alignment for the range.

MSDN documentation for Range.HorizontalAlignment.

◆ SetHorizontalAlignment()

void wxAutoExcel::wxExcelRange::SetHorizontalAlignment ( const long  alignment)

Horizontal alignment for the range.

MSDN documentation for Range.HorizontalAlignment.

◆ GetHyperlinks()

wxExcelHyperlinks wxAutoExcel::wxExcelRange::GetHyperlinks ( )

Returns a Hyperlinks collection that represents the hyperlinks for the range.

MSDN documentation for Range.Hyperlinks.

◆ GetID()

wxString wxAutoExcel::wxExcelRange::GetID ( )

The identifying label for the specified cell when the page is saved as a Web page.

MSDN documentation for Range.ID.

◆ SetID()

void wxAutoExcel::wxExcelRange::SetID ( const wxString &  ID)

The identifying label for the specified cell when the page is saved as a Web page.

MSDN documentation for Range.ID.

◆ GetIndentLevel()

long wxAutoExcel::wxExcelRange::GetIndentLevel ( )

The indent level for the range.

Can be an integer from 0 to 15.

MSDN documentation for Range.IndentLevel.

◆ SetIndentLevel()

void wxAutoExcel::wxExcelRange::SetIndentLevel ( long  indentLevel)

The indent level for the range.

Can be an integer from 0 to 15.

MSDN documentation for Range.IndentLevel.

◆ GetInterior()

wxExcelInterior wxAutoExcel::wxExcelRange::GetInterior ( )

Returns an Interior Represents the interior of the range.

MSDN documentation for Range.Interior.

◆ GetItem()

wxExcelRange wxAutoExcel::wxExcelRange::GetItem ( long  rowIndex,
long *  columnIndex = NULL 
)

Returns a Range Represents a range at an offset to the specified range.

MSDN documentation for Range.Item.

◆ GetLeft()

double wxAutoExcel::wxExcelRange::GetLeft ( )

Returns the distance, in points, from the left edge of column A to the left edge of the range.

MSDN documentation for Range.Left.

◆ GetListHeaderRows()

long wxAutoExcel::wxExcelRange::GetListHeaderRows ( )

Returns the number of header rows for the specified range.

MSDN documentation for Range.ListHeaderRows.

◆ GetListObject()

wxExcelListObject wxAutoExcel::wxExcelRange::GetListObject ( )

Returns a ListObject for Range.

MSDN documentation for Range.ListObject.

◆ GetLocationInTable()

XlLocationInTable wxAutoExcel::wxExcelRange::GetLocationInTable ( )

Returns a constant that describes the part of the PivotTable report that contains the upper-left corner of the specified range.

Can be one of the following XlLocationInTable. constants.

MSDN documentation for Range.LocationInTable.

◆ GetLocked()

wxXlTribool wxAutoExcel::wxExcelRange::GetLocked ( )

Returns tb_true if all cells in the range are locked, tb_true if all cells in the range are unlocked, and tb_default is some cells are locked and some are not.

MSDN documentation for Range.Locked.

◆ SetLocked()

void wxAutoExcel::wxExcelRange::SetLocked ( bool  locked)

Sets a value that indicates if the object is locked.

MSDN documentation for Range.Locked.

◆ GetMDX()

wxString wxAutoExcel::wxExcelRange::GetMDX ( )

Returns the MDX name for the specified Range object.

Since Excel 2007.

MSDN documentation for Range.MDX.

◆ GetMergeArea()

wxExcelRange wxAutoExcel::wxExcelRange::GetMergeArea ( )

Returns a Range Represents the merged range containing the specified cell.

If the specified cell isn't in a merged range, this property returns the specified cell.

MSDN documentation for Range.MergeArea.

◆ GetMergeCells()

bool wxAutoExcel::wxExcelRange::GetMergeCells ( )

True if the range contains merged cells.

MSDN documentation for Range.MergeCells.

◆ GetName()

wxExcelName wxAutoExcel::wxExcelRange::GetName ( )

Returns the name of the object.

MSDN documentation for Range.Name.

◆ SetName()

void wxAutoExcel::wxExcelRange::SetName ( const wxString &  name)

Sets the name of the object.

MSDN documentation for Range.Name.

◆ GetNext()

wxExcelRange wxAutoExcel::wxExcelRange::GetNext ( )

Returns a range representing the next cell.

MSDN documentation for Range.Next.

◆ GetNumberFormat()

wxString wxAutoExcel::wxExcelRange::GetNumberFormat ( )

Returns the format code for the range or an empty string if all the cells in range don't share the same format.

MSDN documentation for Range.NumberFormat.

◆ SetNumberFormat()

void wxAutoExcel::wxExcelRange::SetNumberFormat ( const wxString &  numberFormat)

Sets the format code for the range.

MSDN documentation for Range.NumberFormat.

◆ GetNumberFormatLocal()

wxString wxAutoExcel::wxExcelRange::GetNumberFormatLocal ( )

Returns the format code for the range as a string in the language of the user or an empty string if all the cells in range don't share the same format.

MSDN documentation for Range.NumberFormatLocal.

◆ SetNumberFormatLocal()

void wxAutoExcel::wxExcelRange::SetNumberFormatLocal ( const wxString &  numberFormatLocal)

Sets the format code for the range as a string in the language of the user.

MSDN documentation for Range.NumberFormatLocal.

◆ GetOffset()

wxExcelRange wxAutoExcel::wxExcelRange::GetOffset ( long  rowOffset = 0,
long  columnOffset = 0 
)

Returns a Range Represents a range that's offset from the specified range.

MSDN documentation for Range.Offset.

◆ GetOrientation()

long wxAutoExcel::wxExcelRange::GetOrientation ( )

Returns the text orientation.

See XlOrientation

MSDN documentation for Range.Orientation.

◆ SetOrientation()

void wxAutoExcel::wxExcelRange::SetOrientation ( long  orientation)

Sets the text orientation.

See XlOrientation

MSDN documentation for Range.Orientation.

◆ GetOutlineLevel()

long wxAutoExcel::wxExcelRange::GetOutlineLevel ( )

Returns the current outline level of the specified row or column.

MSDN documentation for Range.OutlineLevel.

◆ SetOutlineLevel()

void wxAutoExcel::wxExcelRange::SetOutlineLevel ( long  outlineLevel)

Sets the current outline level of the specified row or column.

MSDN documentation for Range.OutlineLevel.

◆ GetPageBreak()

XlPageBreak wxAutoExcel::wxExcelRange::GetPageBreak ( )

Returns the location of a page break.

Can be one of the following XlPageBreak constants: xlPageBreakAutomatic, xlPageBreakManual, or xlPageBreakNone.

MSDN documentation for Range.PageBreak.

◆ SetPageBreak()

void wxAutoExcel::wxExcelRange::SetPageBreak ( XlPageBreak  pageBreak)

Sets the location of a page break.

Can be one of the following XlPageBreak constants: xlPageBreakAutomatic, xlPageBreakManual, or xlPageBreakNone.

MSDN documentation for Range.PageBreak.

◆ GetPrecedents()

wxExcelRange wxAutoExcel::wxExcelRange::GetPrecedents ( )

◆ GetPrefixCharacter()

wxString wxAutoExcel::wxExcelRange::GetPrefixCharacter ( )

Returns the prefix character for the cell.

MSDN documentation for Range.PrefixCharacter.

◆ GetPrevious()

wxExcelRange wxAutoExcel::wxExcelRange::GetPrevious ( )

Returns a range represnting the next cell.

MSDN documentation for Range.Previous.

◆ GetReadingOrder()

long wxAutoExcel::wxExcelRange::GetReadingOrder ( )

Returns the reading order for the specified object.

Can be one of the following constants: xlRTL (right-to-left), xlLTR (left-to-right), or xlContext.

MSDN documentation for Range.ReadingOrder.

◆ GetResize()

wxExcelRange wxAutoExcel::wxExcelRange::GetResize ( long *  rowSize = NULL,
long *  columnSize = NULL 
)

Resizes the specified range.

Returns a Range Represents the resized range.

MSDN documentation for Range.Resize.

◆ GetRow()

long wxAutoExcel::wxExcelRange::GetRow ( )

Returns the number of the first row of the first area in the range.

MSDN documentation for Range.Row.

◆ GetRowHeight()

double wxAutoExcel::wxExcelRange::GetRowHeight ( )

If all rows in the range have same height returns the height in points else returns -1.

Returns -2 on error.

MSDN documentation for Range.RowHeight.

◆ SetRowHeight()

void wxAutoExcel::wxExcelRange::SetRowHeight ( double  rowHeight)

Sets the height of all the rows in the range specified, measured in points.

MSDN documentation for Range.RowHeight.

◆ GetShowDetail()

bool wxAutoExcel::wxExcelRange::GetShowDetail ( )

True if the outline is expanded for the specified range (so that the detail of the column or row is visible).

The specified range must be a single summary column or row in an outline. For the PivotItem object (or the Range object if the range is in a PivotTable report), this property is set to True if the item is showing detail.

MSDN documentation for Range.ShowDetail.

◆ GetShrinkToFit()

wxXlTribool wxAutoExcel::wxExcelRange::GetShrinkToFit ( )

Returns tb_true if the text shrinks to fit into the cell in all cells in the range.

Returns tb_default if this property is not the same in all cells in the range.

MSDN documentation for Range.ShrinkToFit.

◆ SetShrinkToFit()

void wxAutoExcel::wxExcelRange::SetShrinkToFit ( bool  shrinkToFit)

Set true if the text is to fit into the cell.

MSDN documentation for Range.ShrinkToFit.

◆ GetSparklineGroups()

wxExcelSparklineGroups wxAutoExcel::wxExcelRange::GetSparklineGroups ( )

Returns a SparklineGroups object that represents an existing group of sparklines from the specified range.

Since Excel 2010.

MSDN documentation for Range.FormatConditions.

◆ GetStyle()

wxExcelStyle wxAutoExcel::wxExcelRange::GetStyle ( )

Returns the style of the range.

MSDN documentation for Range.Style.

◆ SetStyle()

void wxAutoExcel::wxExcelRange::SetStyle ( wxExcelStyle  style)

Sets the style of the range.

MSDN documentation for Range.Style.

◆ GetSummary()

bool wxAutoExcel::wxExcelRange::GetSummary ( )

True if the range is an outlining summary row or column.

The range should be a row or a column.

MSDN documentation for Range.Summary.

◆ GetText()

wxString wxAutoExcel::wxExcelRange::GetText ( )

Returns the text value as seen by user in MS Excel.

The range must comprise of a single cell, else an empty string is returned.

MSDN documentation for Range.Text.

◆ GetTop()

double wxAutoExcel::wxExcelRange::GetTop ( )

Returns the distance, in points, from the top edge of row 1 to the top edge of the range.

MSDN documentation for Range.Top.

◆ GetUseStandardHeight()

wxXlTribool wxAutoExcel::wxExcelRange::GetUseStandardHeight ( )

Returns tb_true if the row height of the Range object equals the standard height of the sheet.

Returns tb_default if the range contains more than one row and the rows are not all the same height.

MSDN documentation for Range.UseStandardHeight.

◆ SetUseStandardHeight()

void wxAutoExcel::wxExcelRange::SetUseStandardHeight ( bool  useStandardHeight)

Whether all cells in the range should use standard row height of the sheet.

MSDN documentation for Range.UseStandardHeight.

◆ GetUseStandardWidth()

wxXlTribool wxAutoExcel::wxExcelRange::GetUseStandardWidth ( )

Returns tb_true if the column width of the Range object equals the standard width of the sheet.

Returns tb_default if the range contains more than one column and the columns are not all the same width.

MSDN documentation for Range.UseStandardWidth.

◆ SetUseStandardWidth()

void wxAutoExcel::wxExcelRange::SetUseStandardWidth ( bool  useStandardWidth)

Whether all cells in the range should use standard column width of the sheet.

MSDN documentation for Range.UseStandardWidth.

◆ GetValidation()

wxExcelValidation wxAutoExcel::wxExcelRange::GetValidation ( )

Returns the Validation object that represents data validation for the specified range.

MSDN documentation for Range.Validation.

◆ GetValue()

wxVariant wxAutoExcel::wxExcelRange::GetValue ( )

Returns the value(s) of the specified range.

MSDN documentation for Range.Value.

Due to wxWidgets internals, GetValue and SetValue work asymetrically by default. For example, let's have a range with address A1:C2, i.e. three columns and two rows. When you ask Excel for values, it puts them into a two-dimensional array. By default, wxVariant does not support multidimensional arrays, so you get values in wxVariant as a single list ordered by columns, in our example it will contain values of cells in this order: A1, A2, B1, B2, C1, C2.

See bulkdata sample to see how efficiently transfer large numbers of values from/to MS Excel as a two-dimensional wxSafeArray.

See also
SetConvertVariantFlags_()

◆ operator wxVariant()

wxAutoExcel::wxExcelRange::operator wxVariant ( )
inline

Same as calling GetValue();.

◆ SetValue()

void wxAutoExcel::wxExcelRange::SetValue ( const wxVariant &  value)

Sets the value for a Range.

MSDN documentation for Range.Value.

Be aware that the automation LCID (see wxAutoExcelObject::SetAutomationLCID_()) also affects how MS Excel may interpret the values passed as strings. E.g. "1,234" may be converted to an integer with value 1234 if the locale uses comma for the thousand separator and the decimal period but the same string may be converted to a float with value 1.234 if the locale has decimal comma.

Check bulkdata sample for an example how to efficiently transfer data to large two-dimensional Ranges.

See also
SetConvertVariantFlags_()

◆ operator=()

void wxAutoExcel::wxExcelRange::operator= ( const wxVariant &  value)
inline

Same as calling SetValue();.

◆ GetValue2()

wxVariant wxAutoExcel::wxExcelRange::GetValue2 ( )

Works almost like GetValue(), except that it returns DateTime and Currency as doubles and not their respective types.

Also see GetValue() for some oddities of this function.

MSDN documentation for Range.Value2.

◆ SetValue2()

void wxAutoExcel::wxExcelRange::SetValue2 ( const wxVariant &  value)

Sets the cell value.

Also see SetValue() for some oddities of this function.

MSDN documentation for Range.Value2.

◆ GetVerticalAlignment()

long wxAutoExcel::wxExcelRange::GetVerticalAlignment ( )

Returns the vertical alignment of the specified object.

MSDN documentation for Range.VerticalAlignment.

◆ SetVerticalAlignment()

void wxAutoExcel::wxExcelRange::SetVerticalAlignment ( long  verticalAlignment)

Sets the vertical alignment of the specified object.

MSDN documentation for Range.VerticalAlignment.

◆ GetWidth()

double wxAutoExcel::wxExcelRange::GetWidth ( )

Returns the width, in units, of the range.

MSDN documentation for Range.Width.

◆ GetWorksheet()

wxExcelWorksheet wxAutoExcel::wxExcelRange::GetWorksheet ( )

Returns the worksheet containing the specified range.

MSDN documentation for Range.Worksheet.

◆ GetWrapText()

wxXlTribool wxAutoExcel::wxExcelRange::GetWrapText ( )

Returns tb_true if all cells in the range wrap the text, tb_false if all cells in the range do not wrap the text, and tb_default if some cells wrap the text and some do not.

MSDN documentation for Range.WrapText.

◆ SetWrapText()

void wxAutoExcel::wxExcelRange::SetWrapText ( bool  wrapText)

Set to true if Microsoft Excel should wrap the text in the object in all cells in the range.

MSDN documentation for Range.WrapText.

◆ GetAutoExcelObjectName_()

virtual wxString wxAutoExcel::wxExcelRange::GetAutoExcelObjectName_ ( ) const
inlinevirtual

Returns "Range".

Reimplemented from wxAutoExcel::wxExcelRangeOwner.

◆ GetConvertVariantFlags_()

long wxAutoExcel::wxExcelRange::GetConvertVariantFlags_ ( )

See wxAutomationObject::GetConvertVariantFlags()

◆ SetConvertVariantFlags_()

bool wxAutoExcel::wxExcelRange::SetConvertVariantFlags_ ( long  flags)

This method, wrapping wxAutomationObject::SetConvertVariantFlags() can be very useful for efficient data transfer to/from Excel, using wxOleConvertVariant_ReturnSafeArrays as a value of flags, see bulkdata sample for an example.

See also
GetValue(), SetValue(), GetValue2(), SetValue2()