wxAutoExcel
2.0.0
|
The base object for all wxAutoExcel objects. More...
Public Types | |
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... | |
Public Member Functions | |
bool | IsOk_ () const |
Returns true if the object has a valid dispatch. More... | |
virtual wxString | GetAutoExcelObjectName_ () const |
Returns "Object". 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... | |
Static Public Member Functions | |
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... | |
The base object for all wxAutoExcel objects.
Flags affecting the behaviour of wxExcelObject and its descendants when an error occurs during accessing an Excel object property or calling its method.
Enumerator | |
---|---|
Err_DoNothing | Do nothing when an error occurs, not to be combined with other |
Err_LogOnInvalidDispatch | Call wxLogError() when attempted to access a property or call a method when the object doesn't have a valid dispatch. |
Err_AssertOnInvalidDispatch | Call wxASSERT when attempted to access a property or call a method when the object doesn't have a valid dispatch. |
Err_ThrowOnInvalidDispatch | Throw wxExcelException when attempted to access a property or call a method when the object doesn't have a valid dispatch. |
Err_LogOnInvalidArgument | Call wxLogError() when an invalid argument has been passed to [Get|Set]Property or calling a method. |
Err_AssertOnInvalidArgument | Call wxASSERT when an invalid argument has been passed to [Get|Set]Property or calling a method. |
Err_ThrowOnInvalidArgument | Throw wxExcelException when an invalid argument has been passed to [Get|Set]Property or calling a method. |
Err_LogOnFailedInvoke | Call wxLogError() when the underlying wxAutomationObject::Invoke() returned false. |
Err_AssertOnFailedInvoke | Call wxASSERT when the underlying wxAutomationObject::Invoke() returned false. |
Err_ThrowOnFailedInvoke | Throw wxExcelException when the underlying wxAutomationObject::Invoke() returned false. |
Err_LogOnInvalidReturnType | Call wxLogError() when the underlying wxAutomationObject::Invoke() returned unexpected variant type. |
Err_AssertOnInvalidReturnType | Call wxASSERT when the underlying wxAutomationObject::Invoke() returned unexpected variant type. |
Err_ThrowOnInvalidReturnType | Throw wxExcelException when the underlying wxAutomationObject::Invoke() returned unexpected variant type. |
Err_LogOnOtherError | Call wxLogError() when an unspecified error occured |
Err_AssertOnOtherError | Call wxASSERT when an unspecified error occured |
Err_ThrowOnOtherError | Throw wxExcelException when an unspecified error occured |
|
inline |
Returns true if the object has a valid dispatch.
|
static |
Sets the error mode to the combination of wxExcelObject::ErrorFlags.
Default error mode is set to Err_LogOnInvalidDispatch | Err_AssertOnInvalidDispatch | Err_LogOnInvalidArgument | Err_AssertOnInvalidArgument | Err_LogOnFailedInvoke | Err_AssertOnFailedInvoke | Err_LogOnInvalidReturnType | Err_AssertOnInvalidReturnType | Err_LogOnOtherError | Err_AssertOnOtherError;
|
static |
Sets the error mode as the combination of wxExcelObject::ErrorFlags.
|
inlinevirtual |
Returns "Object".
Reimplemented in wxAutoExcel::wxExcelWorksheetView, wxAutoExcel::wxExcelWorksheets, wxAutoExcel::wxExcelWorksheet, wxAutoExcel::wxExcelWorkbooks, wxAutoExcel::wxExcelWorkbook, wxAutoExcel::wxExcelWindows, wxAutoExcel::wxExcelWindow, wxAutoExcel::wxExcelWalls, wxAutoExcel::wxExcelValidation, wxAutoExcel::wxExcelUserAccessList, wxAutoExcel::wxExcelUserAccess, wxAutoExcel::wxExcelUpBars, wxAutoExcel::wxExcelUniqueValues, wxAutoExcel::wxExcelTrendlines, wxAutoExcel::wxExcelTrendline, wxAutoExcel::wxExcelTop10, wxAutoExcel::wxExcelTickLabels, wxAutoExcel::wxExcelTextRange2, wxAutoExcel::wxExcelTextFrame, wxAutoExcel::wxExcelTextEffectFormat, wxAutoExcel::wxExcelTextColumn2, wxAutoExcel::wxExcelTabStops2, wxAutoExcel::wxExcelTabStop2, wxAutoExcel::wxExcelTableStyleElements, wxAutoExcel::wxExcelTableStyleElement, wxAutoExcel::wxExcelTableStyles, wxAutoExcel::wxExcelTableStyle, wxAutoExcel::wxExcelTableObject, wxAutoExcel::wxExcelTab, wxAutoExcel::wxExcelStyles, wxAutoExcel::wxExcelStyle, wxAutoExcel::wxExcelSparkPoints, wxAutoExcel::wxExcelSparklineGroups, wxAutoExcel::wxExcelSparklineGroup, wxAutoExcel::wxExcelSparkline, wxAutoExcel::wxExcelSparkColor, wxAutoExcel::wxExcelSparkAxes, wxAutoExcel::wxExcelSparkVerticalAxis, wxAutoExcel::wxExcelSparkHorizontalAxis, wxAutoExcel::wxExcelSortFields, wxAutoExcel::wxExcelSortField, wxAutoExcel::wxExcelSort, wxAutoExcel::wxExcelSoftEdgeFormat, wxAutoExcel::wxExcelSheetViews, wxAutoExcel::wxExcelSheetView, wxAutoExcel::wxExcelSheets, wxAutoExcel::wxExcelSheet, wxAutoExcel::wxExcelShapes, wxAutoExcel::wxExcelShapeRange, wxAutoExcel::wxExcelShapeNodes, wxAutoExcel::wxExcelShapeNode, wxAutoExcel::wxExcelShape, wxAutoExcel::wxExcelShadowFormat, wxAutoExcel::wxExcelSeriesLines, wxAutoExcel::wxExcelFullSeriesCollection, wxAutoExcel::wxExcelSeriesCollection, wxAutoExcel::wxExcelSeries, wxAutoExcel::wxExcelReflectionFormat, wxAutoExcel::wxExcelRecentFiles, wxAutoExcel::wxExcelRecentFile, wxAutoExcel::wxExcelRangeOwner, wxAutoExcel::wxExcelRange, wxAutoExcel::wxExcelProtection, wxAutoExcel::wxExcelPoints, wxAutoExcel::wxExcelPoint, wxAutoExcel::wxExcelPlotArea, wxAutoExcel::wxExcelPictureFormat, wxAutoExcel::wxExcelParagraphFormat2, wxAutoExcel::wxExcelPanes, wxAutoExcel::wxExcelPane, wxAutoExcel::wxExcelPageSetup, wxAutoExcel::wxExcelPages, wxAutoExcel::wxExcelPage, wxAutoExcel::wxExcelPageBreaks, wxAutoExcel::wxExcelPageBreak, wxAutoExcel::wxExcelOutline, wxAutoExcel::wxExcelOLEObjects, wxAutoExcel::wxExcelOLEObject, wxAutoExcel::wxExcelOLEFormat, wxAutoExcel::wxExcelNegativeBarFormat, wxAutoExcel::wxExcelNames, wxAutoExcel::wxExcelName, wxAutoExcel::wxExcelMultiThreadedCalculation, wxAutoExcel::wxExcelModel3DFormat, wxAutoExcel::wxExcelListRows, wxAutoExcel::wxExcelListRow, wxAutoExcel::wxExcelListObjects, wxAutoExcel::wxExcelListObject, wxAutoExcel::wxExcelListDataFormat, wxAutoExcel::wxExcelListColumns, wxAutoExcel::wxExcelListColumn, wxAutoExcel::wxExcelLinkFormat, wxAutoExcel::wxExcelLineFormat, wxAutoExcel::wxExcelLegendKey, wxAutoExcel::wxExcelLegendEntries, wxAutoExcel::wxExcelLegendEntry, wxAutoExcel::wxExcelLegend, wxAutoExcel::wxExcelLeaderLines, wxAutoExcel::wxExcelLanguageSettings, wxAutoExcel::wxExcelInterior, wxAutoExcel::wxExcelIconSets, wxAutoExcel::wxExcelIconSet, wxAutoExcel::wxExcelIconSetCondition, wxAutoExcel::wxExcelIconCriteria, wxAutoExcel::wxExcelIconCriterion, wxAutoExcel::wxExcelIcon, wxAutoExcel::wxExcelHyperlinks, wxAutoExcel::wxExcelHyperlink, wxAutoExcel::wxExcelHiLoLines, wxAutoExcel::wxExcelHeaderFooter, wxAutoExcel::wxExcelGroupShapes, wxAutoExcel::wxExcelGridlines, wxAutoExcel::wxExcelGraphic, wxAutoExcel::wxExcelRectangularGradient, wxAutoExcel::wxExcelLinearGradient, wxAutoExcel::wxExcelColorStops, wxAutoExcel::wxExcelColorStop, wxAutoExcel::wxExcelGlowFormat, wxAutoExcel::wxExcelFreeformBuilder, wxAutoExcel::wxExcelFormatConditions, wxAutoExcel::wxExcelFormatCondition, wxAutoExcel::wxExcelFormatColor, wxAutoExcel::wxExcelFont2, wxAutoExcel::wxExcelFont, wxAutoExcel::wxExcelFloor, wxAutoExcel::wxExcelFilters, wxAutoExcel::wxExcelFilter, wxAutoExcel::wxExcelFillFormat, wxAutoExcel::wxExcelFileExportConverters, wxAutoExcel::wxExcelFileExportConverter, wxAutoExcel::wxExcelErrors, wxAutoExcel::wxExcelError, wxAutoExcel::wxExcelErrorCheckingOptions, wxAutoExcel::wxExcelErrorBars, wxAutoExcel::wxExcelDropLines, wxAutoExcel::wxExcelDownBars, wxAutoExcel::wxExcelDocumentProperties, wxAutoExcel::wxExcelDocumentProperty, wxAutoExcel::wxExcelDisplayUnitLabel, wxAutoExcel::wxExcelDisplayFormat, wxAutoExcel::wxExcelDataTable, wxAutoExcel::wxExcelDataLabels, wxAutoExcel::wxExcelDataLabel, wxAutoExcel::wxExcelDataBarBorder, wxAutoExcel::wxExcelDatabar, wxAutoExcel::wxExcelCustomProperties, wxAutoExcel::wxExcelCustomProperty, wxAutoExcel::wxExcelControlFormat, wxAutoExcel::wxExcelConnectorFormat, wxAutoExcel::wxExcelConditionValue, wxAutoExcel::wxExcelCommentsThreaded, wxAutoExcel::wxExcelCommentThreaded, wxAutoExcel::wxExcelComments, wxAutoExcel::wxExcelComment, wxAutoExcel::wxExcelColorScaleCriteria, wxAutoExcel::wxExcelColorScaleCriterion, wxAutoExcel::wxExcelColorScale, wxAutoExcel::wxExcelColorFormat, wxAutoExcel::wxExcelChartView, wxAutoExcel::wxExcelChartTitle, wxAutoExcel::wxExcelCharts, wxAutoExcel::wxExcelChartObjects, wxAutoExcel::wxExcelChartObject, wxAutoExcel::wxExcelChartGroups, wxAutoExcel::wxExcelChartGroup, wxAutoExcel::wxExcelChartFormat, wxAutoExcel::wxExcelChartFillFormat, wxAutoExcel::wxExcelChartColorFormat, wxAutoExcel::wxExcelCategoryCollection, wxAutoExcel::wxExcelChartCategory, wxAutoExcel::wxExcelChartArea, wxAutoExcel::wxExcelChart, wxAutoExcel::wxExcelCharacters, wxAutoExcel::wxExcelCalloutFormat, wxAutoExcel::wxExcelBulletFormat2, wxAutoExcel::wxExcelBorders, wxAutoExcel::wxExcelBorder, wxAutoExcel::wxExcelAxisTitle, wxAutoExcel::wxExcelAxes, wxAutoExcel::wxExcelAxis, wxAutoExcel::wxExcelAutoFilter, wxAutoExcel::wxExcelAuthor, wxAutoExcel::wxExcelAreas, wxAutoExcel::wxExcelApplication, wxAutoExcel::wxExcelAllowEditRanges, wxAutoExcel::wxExcelAllowEditRange, wxAutoExcel::wxExcelAdjustments, wxAutoExcel::wxExcelAddIns2, wxAutoExcel::wxExcelAddIns, wxAutoExcel::wxExcelAddInsBase, wxAutoExcel::wxExcelAddIn, and wxAutoExcel::wxExcelAboveAverage.
wxString wxAutoExcel::wxExcelObject::GetAutomationObjectName_ | ( | bool | stripUnderscores = false | ) | const |
Returns object name as provided by IDispatch->GetTypeInfo()->GetDocumentation(MEMBERID_NIL, &name, NULL, NULL, NULL).
|
inline |
Returns the underlying wxAutomationObject.
|
inline |
Returns true if the object has a valid dispatch and its last automation call (if any), i.e.
accessing a property or calling a method, succeeded.
WXLCID wxAutoExcel::wxExcelObject::GetAutomationLCID_ | ( | ) | const |
Returns the locale identifier used in automation calls.
See wxAutomationObject::GetLCID().
bool wxAutoExcel::wxExcelObject::SetAutomationLCID_ | ( | WXLCID | lcid | ) |
Sets the locale identifier to be used in automation calls.
See wxAutomationObject::SetLCID(). Be aware that this among else affects how MS Excel interprets list separators and values in e.g. in Range.Address, Range.Value.
bool wxAutoExcel::wxExcelObject::GetPropertyAndMethodNames_ | ( | wxArrayString & | propertyNames, |
wxArrayString & | methodNames, | ||
bool | includeHidden = false |
||
) |
Returns lists of property and method names the automation interface exposes.
If includeHidden is false, names of properties and methods with FUNCFLAG_FHIDDEN set will not be included. Note. The list will also include methods of IUnknown and IDispatch.
bool wxAutoExcel::wxExcelObject::GetUnimplementedObject_ | ( | const wxString & | name, |
wxAutomationObject & | object | ||
) |
Helper function for receiving an automation object not implemented in wxAutoExcel, see FAQ on how to use.
|
static |
Helper function for obtaining an item from MS Excel collection not implemented in wxAutoExcel, see FAQ on how to use.
Some collections provide their items as as Item property (e.g. Workbooks, Windows, Worksheets or Ranges) while others as a result of Item() method call (e.g. ColorStops, Shapes, FormatConditions or Names) If the collection provides items via Property, asProperty must be true, otherwise it must be set to false. You can learn which to use with online Excel VBA Object Model documentaion or using the Object Browser in the Excel VBA IDE. Index must be between 1 and collection.Count.