wxAutoExcel  2.0.0
wxAutoExcel::wxExcelShapes Class Reference

Represents Microsoft Excel Shape object. More...

Inheritance diagram for wxAutoExcel::wxExcelShapes:
wxAutoExcel::wxExcelObject

Public Member Functions

wxExcelShape Add3DModel (const wxString &fileName, wxXlTribool linkToFile=wxDefaultXlTribool, wxXlTribool saveWithDocument=wxDefaultXlTribool, double *left=NULL, double *top=NULL, double *width=NULL, double *height=NULL)
 Creates a 3D model from an existing file. More...
 
wxExcelShape AddCallout (MsoCalloutType type, double left, double top, double width, double height)
 Creates a borderless line callout. More...
 
wxExcelShape AddChart (XlChartType type, double left, double top, double width, double height)
 Creates a chart at the specified location on the active sheet. More...
 
wxExcelShape AddChart2 (long style=-1, XlChartType *type=NULL, double *left=NULL, double *top=NULL, double *width=NULL, double *height=NULL, wxXlTribool newLayout=wxDefaultXlTribool)
 Adds a chart to the document. More...
 
wxExcelShape AddConnector (MsoConnectorType type, double beginX, double beginY, double endX, double endY)
 Creates a connector. More...
 
wxExcelShape AddCurve (const wxVector< wxPoint2DDouble > &points)
 Returns a Shape that represents a Bézier curve in a worksheet. More...
 
wxExcelShape AddFormControl (XlFormControl type, double left, double top, double width, double height)
 Creates a Microsoft Excel control. More...
 
wxExcelShape AddLabel (MsoTextOrientation orientation, double left, double top, double width, double height)
 Creates a label. More...
 
wxExcelShape AddLine (double beginX, double beginY, double endX, double endY)
 As it applies to the Shapes object, Returns a Shape that represents the new line in a worksheet. More...
 
wxExcelShape AddOLEObject (const wxString &classType=wxEmptyString, const wxString &filename=wxEmptyString, wxXlTribool link=wxDefaultXlTribool, wxXlTribool displayAsIcon=wxDefaultXlTribool, const wxString &iconFileName=wxEmptyString, long *iconIndex=NULL, const wxString &iconLabel=wxEmptyString, double *left=NULL, double *top=NULL, double *width=NULL, double *height=NULL)
 Creates an OLE object. More...
 
wxExcelShape AddPicture (const wxString &fileName, MsoTriState linkToFile, MsoTriState saveWithDocument, double left, double top, double width, double height)
 Creates a picture from an existing file. More...
 
wxExcelShape AddPicture2 (const wxString &fileName, MsoTriState linkToFile, MsoTriState saveWithDocument, double left, double top, double *width=NULL, double *height=NULL, MsoPictureCompress *compress=NULL)
 Creates a picture from an existing file. More...
 
wxExcelShape AddPolyline (const wxVector< wxPoint2DDouble > &points)
 Creates an open polyline or a closed polygon drawing. More...
 
wxExcelShape AddShape (MsoAutoShapeType type, double left, double top, double width, double height)
 Returns a Shape that represents the new AutoShape in a worksheet. More...
 
wxExcelShape AddTextbox (MsoTextOrientation orientation, double left, double top, double width, double height)
 Creates a text box. More...
 
wxExcelShape AddTextEffect (MsoPresetTextEffect presetTextEffect, const wxString &text, const wxString &fontName, double fontSize, MsoTriState fontBold, MsoTriState fontItalic, double left, double top)
 Creates a WordArt object. More...
 
wxExcelFreeformBuilder BuildFreeform (MsoEditingType editingType, double X1, double Y1)
 Builds a freeform object. More...
 
wxExcelShape Item (long index)
 Returns a single object from a collection. More...
 
void SelectAll ()
 Selects all the shapes in the specified Shapes collection. More...
 
long GetCount ()
 Returns a Long value that represents the number of objects in the collection. More...
 
wxExcelShapeRange GetRange (long index)
 Returns a ShapeRange Represents a subset of the shapes in a Shapes collection. More...
 
virtual wxString GetAutoExcelObjectName_ () const
 Returns "Shapes". 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 Shape object.

Member Function Documentation

◆ Add3DModel()

wxExcelShape wxAutoExcel::wxExcelShapes::Add3DModel ( const wxString &  fileName,
wxXlTribool  linkToFile = wxDefaultXlTribool,
wxXlTribool  saveWithDocument = wxDefaultXlTribool,
double *  left = NULL,
double *  top = NULL,
double *  width = NULL,
double *  height = NULL 
)

Creates a 3D model from an existing file.

Excel VBA documentation for Shapes.Add3DModel

◆ AddCallout()

wxExcelShape wxAutoExcel::wxExcelShapes::AddCallout ( MsoCalloutType  type,
double  left,
double  top,
double  width,
double  height 
)

Creates a borderless line callout.

Returns a Shape that represents the new callout.

MSDN documentation for Shapes.AddCallout.

◆ AddChart()

wxExcelShape wxAutoExcel::wxExcelShapes::AddChart ( XlChartType  type,
double  left,
double  top,
double  width,
double  height 
)

Creates a chart at the specified location on the active sheet.

For Excel 2013 and newer it is recommended to use AddChart2 instead.

MSDN documentation for Shapes.AddChart.

◆ AddChart2()

wxExcelShape wxAutoExcel::wxExcelShapes::AddChart2 ( long  style = -1,
XlChartType type = NULL,
double *  left = NULL,
double *  top = NULL,
double *  width = NULL,
double *  height = NULL,
wxXlTribool  newLayout = wxDefaultXlTribool 
)

Adds a chart to the document.

Returns a Shape object that represents a chart and adds it to the specified collection. Since Excel 2013.

MSDN documentation for Shapes.AddChart2.

◆ AddConnector()

wxExcelShape wxAutoExcel::wxExcelShapes::AddConnector ( MsoConnectorType  type,
double  beginX,
double  beginY,
double  endX,
double  endY 
)

Creates a connector.

Returns a Shape that represents the new connector. When a connector is added, it's not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.

MSDN documentation for Shapes.AddConnector.

◆ AddCurve()

wxExcelShape wxAutoExcel::wxExcelShapes::AddCurve ( const wxVector< wxPoint2DDouble > &  points)

Returns a Shape that represents a Bézier curve in a worksheet.

MSDN documentation for Shapes.AddCurve.

◆ AddFormControl()

wxExcelShape wxAutoExcel::wxExcelShapes::AddFormControl ( XlFormControl  type,
double  left,
double  top,
double  width,
double  height 
)

Creates a Microsoft Excel control.

Returns a Shape that represents the new control.

MSDN documentation for Shapes.AddFormControl.

◆ AddLabel()

wxExcelShape wxAutoExcel::wxExcelShapes::AddLabel ( MsoTextOrientation  orientation,
double  left,
double  top,
double  width,
double  height 
)

Creates a label.

Returns a Shape that represents the new label.

MSDN documentation for Shapes.AddLabel.

◆ AddLine()

wxExcelShape wxAutoExcel::wxExcelShapes::AddLine ( double  beginX,
double  beginY,
double  endX,
double  endY 
)

As it applies to the Shapes object, Returns a Shape that represents the new line in a worksheet.

MSDN documentation for Shapes.AddLine.

◆ AddOLEObject()

wxExcelShape wxAutoExcel::wxExcelShapes::AddOLEObject ( const wxString &  classType = wxEmptyString,
const wxString &  filename = wxEmptyString,
wxXlTribool  link = wxDefaultXlTribool,
wxXlTribool  displayAsIcon = wxDefaultXlTribool,
const wxString &  iconFileName = wxEmptyString,
long *  iconIndex = NULL,
const wxString &  iconLabel = wxEmptyString,
double *  left = NULL,
double *  top = NULL,
double *  width = NULL,
double *  height = NULL 
)

Creates an OLE object.

Returns a Shape that represents the new OLE object.

MSDN documentation for Shapes.AddOLEObject.

◆ AddPicture()

wxExcelShape wxAutoExcel::wxExcelShapes::AddPicture ( const wxString &  fileName,
MsoTriState  linkToFile,
MsoTriState  saveWithDocument,
double  left,
double  top,
double  width,
double  height 
)

Creates a picture from an existing file.

Returns a Shape that represents the new picture.

MSDN documentation for Shapes.AddPicture.

◆ AddPicture2()

wxExcelShape wxAutoExcel::wxExcelShapes::AddPicture2 ( const wxString &  fileName,
MsoTriState  linkToFile,
MsoTriState  saveWithDocument,
double  left,
double  top,
double *  width = NULL,
double *  height = NULL,
MsoPictureCompress compress = NULL 
)

Creates a picture from an existing file.

Returns a Shape that represents the new picture.

MSDN documentation for Shapes.AddPicture2.

◆ AddPolyline()

wxExcelShape wxAutoExcel::wxExcelShapes::AddPolyline ( const wxVector< wxPoint2DDouble > &  points)

Creates an open polyline or a closed polygon drawing.

Returns a Shape that represents the new polyline or polygon.

MSDN documentation for Shapes.AddPolyline.

◆ AddShape()

wxExcelShape wxAutoExcel::wxExcelShapes::AddShape ( MsoAutoShapeType  type,
double  left,
double  top,
double  width,
double  height 
)

Returns a Shape that represents the new AutoShape in a worksheet.

MSDN documentation for Shapes.AddShape.

◆ AddTextbox()

wxExcelShape wxAutoExcel::wxExcelShapes::AddTextbox ( MsoTextOrientation  orientation,
double  left,
double  top,
double  width,
double  height 
)

Creates a text box.

Returns a Shape that represents the new text box.

MSDN documentation for Shapes.AddTextbox.

◆ AddTextEffect()

wxExcelShape wxAutoExcel::wxExcelShapes::AddTextEffect ( MsoPresetTextEffect  presetTextEffect,
const wxString &  text,
const wxString &  fontName,
double  fontSize,
MsoTriState  fontBold,
MsoTriState  fontItalic,
double  left,
double  top 
)

Creates a WordArt object.

Returns a Shape that represents the new WordArt object.

MSDN documentation for Shapes.AddTextEffect.

◆ BuildFreeform()

wxExcelFreeformBuilder wxAutoExcel::wxExcelShapes::BuildFreeform ( MsoEditingType  editingType,
double  X1,
double  Y1 
)

Builds a freeform object.

Returns a FreeformBuilder Represents the freeform as it is being built. Use the AddNodes method to add segments to the freeform. After you have added at least one segment to the freeform, you can use the ConvertToShape method to convert the FreeformBuilder object into a Shape object that has the geometric description you’ve defined in the FreeformBuilder object.

MSDN documentation for Shapes.BuildFreeform.

◆ Item()

wxExcelShape wxAutoExcel::wxExcelShapes::Item ( long  index)

Returns a single object from a collection.

MSDN documentation for Shapes.Item.

◆ SelectAll()

void wxAutoExcel::wxExcelShapes::SelectAll ( )

Selects all the shapes in the specified Shapes collection.

MSDN documentation for Shapes.SelectAll.

◆ GetCount()

long wxAutoExcel::wxExcelShapes::GetCount ( )

Returns a Long value that represents the number of objects in the collection.

MSDN documentation for Shapes.Count.

◆ GetRange()

wxExcelShapeRange wxAutoExcel::wxExcelShapes::GetRange ( long  index)

Returns a ShapeRange Represents a subset of the shapes in a Shapes collection.

MSDN documentation for Shapes.Range.

◆ GetAutoExcelObjectName_()

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

Returns "Shapes".

Reimplemented from wxAutoExcel::wxExcelObject.