com.aspose.cells
Classes 
AboveAverage
AbstractCalculationEngine
AbstractCalculationMonitor
AbstractGlobalizationSettings
AbstractInterruptMonitor
AbstractTextLoadOptions
ActiveXControl
ActiveXControlBase
ArcShape
Area
AutoFilter
AutoFitterOptions
AutomaticFill
AutoNumberedBulletValue
Axis
AxisBins
BaseShapeGuide
Bevel
Border
BorderCollection
BuiltInDocumentPropertyCollection
Bullet
BulletValue
Button
CalculationCell
CalculationData
CalculationOptions
Cell
CellArea
Cells
CellsColor
CellsDataTableFactory
CellsDrawing
CellsException
CellsFactory
CellsHelper
CellWatch
CellWatchCollection
CharacterBulletValue
Chart
ChartArea
ChartCollection
ChartDataTable
ChartFrame
ChartGlobalizationSettings
ChartPoint
ChartPointCollection
ChartShape
ChartTextFrame
CheckBox
CheckBoxActiveXControl
CheckBoxCollection
CollectionBase
Color
ColorFilter
ColorHelper
ColorScale
Column
ColumnCollection
ComboBox
ComboBoxActiveXControl
CommandButtonActiveXControl
Comment
CommentCollection
CommentShape
ConditionalFormattingCollection
ConditionalFormattingIcon
ConditionalFormattingIconCollection
ConditionalFormattingResult
ConditionalFormattingValue
ConditionalFormattingValueCollection
ConnectionParameter
ConnectionParameterCollection
ContentTypeProperty
ContentTypePropertyCollection
CopyOptions
CustomDocumentPropertyCollection
CustomFilter
CustomFilterCollection
CustomGeometry
CustomImplementationFactory
CustomProperty
CustomPropertyCollection
CustomXmlPart
CustomXmlPartCollection
CustomXmlShape
DataBar
DataBarBorder
DataLabels
DataSorter
DataSorterKey
DataSorterKeyCollection
DateTime
DateTimeGroupItem
DBConnection
DefaultStyleSettings
DeleteOptions
DialogBox
DifSaveOptions
DigitalSignature
DigitalSignatureCollection
DisplayUnitLabel
DocumentProperty
DocumentPropertyCollection
DocxSaveOptions
DrawObject
DrawObjectEventHandler
DropBars
DxfCollection
DynamicFilter
Encoding
ErrorBar
ErrorCheckOption
ErrorCheckOptionCollection
ExportObjectEvent
ExportRangeToJsonOptions
ExportTableOptions
ExternalConnection
ExternalConnectionCollection
ExternalLink
ExternalLinkCollection
FileFontSource
FileFormatInfo
FileFormatUtil
Fill
FillFormat
FilterColumn
FilterColumnCollection
FindOptions
Floor
FolderFontSource
Font
FontConfigs
FontSetting
FontSettingCollection
FontSourceBase
Format3D
FormatCondition
FormatConditionCollection
FormulaParseOptions
FormulaSettings
Geometry
GlobalizationSettings
GlowEffect
GradientFill
GradientStop
GradientStopCollection
GroupBox
GroupFill
GroupShape
HeaderFooterCommand
HorizontalPageBreak
HorizontalPageBreakCollection
HtmlLoadOptions
HtmlSaveOptions
Hyperlink
HyperlinkCollection
IconFilter
IconSet
ImageActiveXControl
ImageFormat
ImageOrPrintOptions
ImageSaveOptions
ImportTableOptions
IndividualFontConfigs
InsertOptions
InterruptMonitor
JsonLayoutOptions
JsonLoadOptions
JsonSaveOptions
JsonUtility
Label
LabelActiveXControl
Legend
LegendEntry
LegendEntryCollection
License
Line
LineFormat
LineShape
ListBox
ListBoxActiveXControl
ListColumn
ListColumnCollection
ListObject
ListObjectCollection
LoadFilter
LoadOptions
MarkdownSaveOptions
Marker
MemoryFontSource
MetadataOptions
Metered
MsoFillFormat
MsoFillFormatHelper
MsoFormatPicture
MsoLineFormat
MsoLineFormatHelper
MsoTextFrame
MultipleFilterCollection
Name
NameCollection
NegativeBarFormat
NoneBulletValue
NoneFill
OdsCellField
OdsCellFieldCollection
OdsLoadOptions
OdsPageBackground
OdsSaveOptions
OleObject
OleObjectCollection
OoxmlSaveOptions
Outline
Oval
PageEndSavingArgs
PageSavingArgs
PageSetup
PageStartSavingArgs
PaginatedSaveOptions
PaneCollection
PasteOptions
PatternFill
PdfBookmarkEntry
PdfSaveOptions
PdfSecurityOptions
PicFormatOption
Picture
PictureBulletValue
PictureCollection
PivotField
PivotFieldCollection
PivotFilter
PivotFilterCollection
PivotFormatCondition
PivotFormatConditionCollection
PivotItem
PivotItemCollection
PivotOptions
PivotPageFields
PivotTable
PivotTableCollection
PlotArea
PptxSaveOptions
ProtectedRange
ProtectedRangeCollection
Protection
QueryTable
QueryTableCollection
RadioButton
RadioButtonActiveXControl
Range
RangeCollection
RectangleShape
ReferredArea
ReferredAreaCollection
ReflectionEffect
ReplaceOptions
Revision
RevisionAutoFormat
RevisionCellChange
RevisionCellComment
RevisionCellMove
RevisionCollection
RevisionCustomView
RevisionDefinedName
RevisionFormat
RevisionInsertDelete
RevisionInsertSheet
RevisionLog
RevisionLogCollection
RevisionMergeConflict
RevisionQueryTable
RevisionRenameSheet
Row
RowCollection
SaveOptions
Scenario
ScenarioCollection
ScenarioInputCell
ScenarioInputCellCollection
ScrollBar
ScrollBarActiveXControl
Series
SeriesCollection
SeriesLayoutProperties
ShadowEffect
Shape
ShapeCollection
ShapeFormat
ShapeGuide
ShapeGuideCollection
ShapePath
ShapePathCollection
ShapePathPoint
ShapePathPointCollection
ShapePropertyCollection
ShapeSegmentPath
ShapeSegmentPathCollection
ShapeTextAlignment
SheetPrintingPreview
SheetRender
SheetSet
SignatureLine
Slicer
SlicerCache
SlicerCacheItem
SlicerCacheItemCollection
SlicerCollection
SmartArtShape
SmartTag
SmartTagCollection
SmartTagOptions
SmartTagProperty
SmartTagPropertyCollection
SmartTagSetting
SolidFill
Sparkline
SparklineCollection
SparklineGroup
SparklineGroupCollection
SpinButtonActiveXControl
Spinner
SpreadsheetML2003SaveOptions
StreamProviderOptions
Style
StyleFlag
SubtotalSetting
SvgSaveOptions
SxRng
TableStyle
TableStyleCollection
TableStyleElement
TableStyleElementCollection
TableToRangeOptions
TextBox
TextBoxActiveXControl
TextBoxCollection
TextEffectFormat
TextOptions
TextParagraph
TextParagraphCollection
TextTabStop
TextTabStopCollection
TextureFill
ThemeColor
ThreadedComment
ThreadedCommentAuthor
ThreadedCommentAuthorCollection
ThreadedCommentCollection
ThreeDFormat
TickLabelItem
TickLabels
TilePicOption
Timeline
TimelineCollection
Title
ToggleButtonActiveXControl
Top10
Top10Filter
Trendline
TrendlineCollection
TxtLoadOptions
TxtSaveOptions
UnionRange
UnknownControl
Validation
ValidationCollection
VbaModule
VbaModuleCollection
VbaProject
VbaProjectReference
VbaProjectReferenceCollection
VerticalPageBreak
VerticalPageBreakCollection
VmlShapeGuide
Walls
WarningInfo
WebExtension
WebExtensionBinding
WebExtensionBindingCollection
WebExtensionCollection
WebExtensionProperty
WebExtensionPropertyCollection
WebExtensionReference
WebExtensionReferenceCollection
WebExtensionShape
WebExtensionTaskPane
WebExtensionTaskPaneCollection
WebQueryConnection
Workbook
WorkbookDesigner
WorkbookMetadata
WorkbookPrintingPreview
WorkbookRender
WorkbookSettings
Worksheet
WorksheetCollection
WriteProtection
XlsbSaveOptions
XlsSaveOptions
XmlColumnProperty
XmlDataBinding
XmlLoadOptions
XmlMap
XmlMapCollection
XmlSaveOptions
XpsSaveOptions
Interfaces 
ICellsDataTable
ICustomFunction
ICustomParser
IExportObjectListener
IFilePathProvider
IPageSavingCallback
ISmartMarkerCallBack
IStreamProvider
IWarningCallback
LightCellsDataHandler
LightCellsDataProvider
Constants 
AccessCacheOptions
ActiveXPersistenceType
AutoFillType
AutoFitMergedCellsType
AutoFitWrappedTextType
AutoShapeType
AxisType
BackgroundMode
BackgroundType
Bar3DShapeType
BevelPresetType
BevelType
BorderType
BubbleSizeRepresents
BuiltinStyleType
BulletType
CalcModeType
CalculationPrecisionStrategy
CategoryType
CellBorderType
CellValueFormatStrategy
CellValueType
ChartLineFormattingType
ChartMarkerType
ChartSplitType
ChartTextDirectionType
ChartType
CheckValueType
ColorDepth
ColorType
CommentTitleType
ConnectionDataSourceType
ConnectionParameterType
ConsolidationFunction
ControlBorderType
ControlCaptionAlignmentType
ControlListStyle
ControlMatchEntryType
ControlMousePointerType
ControlPictureAlignmentType
ControlPicturePositionType
ControlPictureSizeMode
ControlScrollBarType
ControlScrollOrientation
ControlSpecialEffectType
ControlType
CopyFormatType
CountryCode
CredentialsMethodType
CrossType
DataBarAxisPosition
DataBarBorderType
DataBarFillType
DataBarNegativeColorType
DataLabelShapeType
DataLabelsSeparatorType
DataLablesSeparatorType
DateTimeGroupingType
DefaultEditLanguage
DirectoryType
DisplayDrawingObjects
DisplayUnitType
DrawObjectEnum
DropButtonStyle
DynamicFilterType
EmfRenderSetting
EncryptionType
ErrorBarDisplayType
ErrorBarType
ErrorCheckType
ExceptionType
ExternalLinkType
FileFormatType
FillPattern
FillPictureType
FillType
FilterOperatorType
FilterType
FontSchemeType
FontSourceType
FontUnderlineType
FormatConditionType
FormatConditionValueType
FormatSetType
FormattingType
GradientColorType
GradientDirectionType
GradientFillType
GradientPresetType
GradientStyleType
GridlineType
HeaderFooterCommandType
HtmlCrossType
HtmlExportDataOptions
HtmlFormatHandlingType
HtmlHiddenColDisplayType
HtmlHiddenRowDisplayType
HtmlLinkTargetType
IconSetType
ImageType
InputMethodEditorMode
LabelPositionType
LegendPositionType
LightRigDirectionType
LightRigType
LineCapType
LineJoinType
LineSpaceSizeType
LineType
LoadDataFilterOptions
LoadFormat
LookAtType
LookInType
MapChartLabelLayout
MapChartProjectionType
MapChartRegionType
MemorySetting
MetadataType
MirrorType
MsoArrowheadLength
MsoArrowheadStyle
MsoArrowheadWidth
MsoDrawingType
MsoLineDashStyle
MsoLineStyle
MsoPresetTextEffect
MsoPresetTextEffectShape
NameScopeType
NumberCategoryType
OdsCellFieldType
OdsGeneratorType
OdsPageBackgroundGraphicPositionType
OdsPageBackgroundGraphicType
OdsPageBackgroundType
OLEDBCommandType
OoxmlCompliance
OoxmlCompressionType
OperatorType
PageLayoutAlignmentType
PageOrientationType
PaneStateType
PaperSizeType
ParameterType
PasteOperationType
PasteType
PdfCompliance
PdfCompressionCore
PdfCustomPropertiesExport
PdfFontEncoding
PdfOptimizationType
PivotConditionFormatRuleType
PivotConditionFormatScopeType
PivotFieldDataDisplayFormat
PivotFieldSubtotalType
PivotFieldType
PivotFilterType
PivotGroupByType
PivotItemPosition
PivotMissingItemLimitType
PivotTableAutoFormatType
PivotTableStyleType
PlacementType
PlotDataByType
PlotEmptyCellsType
PresetCameraType
PresetMaterialType
PresetShadowType
PresetWordArtStyle
PrintCommentsType
PrintErrorsType
PrintingPageType
PrintOrderType
PrintSizeType
PropertyType
ProtectionType
QuartileCalculationType
ReConnectionMethodType
RectangleAlignmentType
ReflectionEffectType
RenameStrategy
ResourceLoadingType
RevisionActionType
RevisionType
SaveFormat
SelectionType
ShapeAnchorType
ShapeLockType
ShapePathType
SheetType
ShiftType
ShowDropButtonType
SlicerCacheCrossFilterType
SlicerCacheItemSortType
SlicerStyleType
SmartTagShowType
SortOnType
SortOrder
SparklineAxisMinMaxType
SparklinePresetStyleType
SparklineType
SqlDataType
StyleModifyFlag
TableDataSourceType
TableStyleElementType
TableStyleType
TargetModeType
TextAlignmentType
TextAutonumberScheme
TextCapsType
TextCrossType
TextDirectionType
TextFontAlignType
TextNodeType
TextOrientationType
TextOverflowType
TextStrikeType
TextTabAlignmentType
TextureType
TextVerticalType
ThemeColorType
TickLabelPositionType
TickMarkType
TiffCompression
TimePeriodType
TimeUnit
TotalsCalculation
TrendlineType
TxtLoadStyleStrategy
TxtValueQuoteType
UpdateLinksType
ValidationAlertType
ValidationType
VbaModuleType
VbaProjectReferenceType
ViewType
VisibilityType
WarningType
WebExtensionStoreType
WeightType
XAdESType

com.aspose.cells
Class ShapeCollection

java.lang.Object
  extended by CollectionBase
      extended by com.aspose.cells.ShapeCollection
All Implemented Interfaces:
java.lang.Iterable

public class ShapeCollection 
extends CollectionBase

Represents all the shape in a worksheet/chart.

Example:

//Instantiating a Workbook object
Workbook workbook = new Workbook();

//get ShapeCollection
ShapeCollection shapes = workbook.getWorksheets().get(0).getShapes();

//do your business

//Save the excel file.
workbook.save("result.xlsx");


Property Getters/Setters Summary
intgetCount()→ inherited from com.aspose.cells.CollectionBase
          
Shapeget(int)
           Gets the shape object at the specific index.
Shapeget(java.lang.String)
           Gets the shape object by the shape image
 
Method Summary
intadd(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
ShapeaddActiveXControl(int type, int topRow, int top, int leftColumn, int left, int width, int height)
           Creates an Activex Control.
ArcShapeaddArc(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ArcShape to the worksheet.
ShapeaddAutoShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a AutoShape to the worksheet.
ShapeaddAutoShapeInChart(int type, int top, int left, int height, int width)
           Adds a AutoShape to the chart.
ButtonaddButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Button to the worksheet.
CheckBoxaddCheckBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a checkbox to the worksheet.
ComboBoxaddComboBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ComboBox to the worksheet.
ShapeaddCopy(Shape sourceShape, int upperLeftRow, int top, int upperLeftColumn, int left)
           Adds and copy a shape to the worksheet.
ShapeaddFreeFloatingShape(int type, int top, int left, int height, int width, byte[] imageData, boolean isOriginalSize)
           Adds a free floating shape to the worksheet.Only applies for line/image shape.
GroupBoxaddGroupBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a GroupBox to the worksheet.
PictureaddIcons(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageByteData, byte[] compatibleImageData)
           Adds svg image.
LabeladdLabel(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Label to the worksheet.
LabeladdLabelInChart(int top, int left, int height, int width)
           Adds a label to the chart.
LineShapeaddLine(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a LineShape to the worksheet.
PictureaddLinkedPicture(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
           Add a linked picture.
ListBoxaddListBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ListBox to the worksheet.
OleObjectaddOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageData)
          
OleObjectaddOleObjectWithLinkedImage(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
           Add a linked picture.
OvaladdOval(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Oval to the worksheet.
PictureaddPicture(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn, java.io.InputStream stream)
           Adds a picture to the collection.
PictureaddPicture(int upperLeftRow, int upperLeftColumn, java.io.InputStream stream, int widthScale, int heightScale)
           Adds a picture to the collection.
PictureaddPictureInChart(int top, int left, java.io.InputStream stream, int widthScale, int heightScale)
           Adds a picture to the chart.
RadioButtonaddRadioButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a RadioButton to the worksheet.
RectangleShapeaddRectangle(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a RectangleShape to the worksheet.
ScrollBaraddScrollBar(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a ScrollBar to the worksheet.
ShapeaddShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Shape to the worksheet.
ShapeaddShapeInChart(int type, int placement, int left, int top, int right, int bottom)
           Add a shape to chart .All unit is 1/4000 of chart area.
ShapeaddShapeInChart(int type, int placement, int left, int top, int right, int bottom, byte[] imageData)
           Add a shape to chart .All unit is 1/4000 of chart area.
ShapeaddShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom)
           Add a shape to chart. All unit is percent scale of chart area.
ShapeaddShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom, byte[] imageData)
           Add a shape to chart .All unit is 1/4000 of chart area.
SpinneraddSpinner(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a Spinner to the worksheet.
PictureaddSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] svgData, byte[] compatibleImageData)
           Adds svg image.
TextBoxaddTextBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds a text box to the worksheet.
TextBoxaddTextBoxInChart(int top, int left, int height, int width)
           Adds a textbox to the chart.
ShapeaddTextEffect(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Inserts a WordArt object.
ShapeaddTextEffectInChart(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int top, int left, int height, int width)
           Inserts a WordArt object to the chart
ShapeaddWordArt(int style, java.lang.String text, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
           Adds preset WordArt since Excel 2007.s
voidclear()
           Clear all shapes.
booleancontains(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
voidcopyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
           Copy all comments in the range.
voidcopyInRange(ShapeCollection sourceShapes, CellArea ca, int destRow, int destColumn, boolean isContained)
           Copy shapes in the range to destination range.
voiddeleteInRange(CellArea ca)
           Delete shapes in the range.Comment shapes will not be deleted.
voiddeleteShape(Shape shape)
           Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted.
GroupShapegroup(com.aspose.cells.Shape[] groupItems)
           Group the shapes.
intindexOf(java.lang.Object value)→ inherited from com.aspose.cells.CollectionBase
          Reserved for internal use.
java.util.Iteratoriterator()→ inherited from com.aspose.cells.CollectionBase
          
voidremove(Shape shape)
           Remove the shape.
voidremoveAt(int index)
           Remove the shape.
voidungroup(GroupShape group)
           Ungroups the shape items.
voidupdateSelectedValue()
           Update the selected value by the value of the linked cell of the shapes.
 

Property Getters/Setters Detail

getCount

→ inherited from com.aspose.cells.CollectionBase
public int getCount()

get

public Shape get(int index)
Gets the shape object at the specific index.
Parameters:
index -
Returns:

Example:

//get the shape
Shape shape = shapes.get(shapes.getCount() -1);

get

public Shape get(java.lang.String name)
Gets the shape object by the shape image
Parameters:
name -
Returns:

Example:

//add a shape
shapes.addRectangle(2, 0, 2, 0, 130, 130);
//get the shape
Shape shape1 = shapes.get("Rectangle 1");
if(shape1 != null)
{
    //Got the shape named 'Rectangle 1'.
}

Method Detail

addCopy

public Shape addCopy(Shape sourceShape, int upperLeftRow, int top, int upperLeftColumn, int left)
             throws java.lang.Exception
Adds and copy a shape to the worksheet.
Parameters:
sourceShape - Source shape.
upperLeftRow - Upper left row index.
top - Represents the vertical offset of checkbox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of textbox from its left column, in unit of pixel.
Returns:
The new shape object index.

Example:

//add a shape
RectangleShape rectangle = shapes.addRectangle(2, 0, 2, 0, 130, 130);
//copy
shapes.addCopy(rectangle, 7, 0, 7, 0);

addCheckBox

public CheckBox addCheckBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a checkbox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of checkbox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of textbox from its left column, in unit of pixel.
height - Height of textbox, in unit of pixel.
width - Width of textbox, in unit of pixel.
Returns:
The new CheckBox object index.

Example:

//add a CheckBox
CheckBox checkBox = shapes.addCheckBox(1, 0, 1, 0, 100, 50);

addTextBox

public TextBox addTextBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a text box to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of textbox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of textbox from its left column, in unit of pixel.
height - Represents the height of textbox, in unit of pixel.
width - Represents the width of textbox, in unit of pixel.
Returns:
A TextBox object.

Example:

//add a TextBox
TextBox textBox = shapes.addTextBox(1, 0, 1, 0, 100, 50);

addSpinner

public Spinner addSpinner(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Spinner to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Spinner from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Spinner from its left column, in unit of pixel.
height - Represents the height of Spinner, in unit of pixel.
width - Represents the width of Spinner, in unit of pixel.
Returns:
A Spinner object.

Example:

//add a spinner
Spinner spinner = shapes.addSpinner(1, 0, 1, 0, 100, 50);

addScrollBar

public ScrollBar addScrollBar(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ScrollBar to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ScrollBar from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ScrollBar from its left column, in unit of pixel.
height - Represents the height of ScrollBar, in unit of pixel.
width - Represents the width of ScrollBar, in unit of pixel.
Returns:
A ScrollBar object.

Example:

//add a scroll bar
ScrollBar scrollBar = shapes.addScrollBar(1, 0, 1, 0, 100, 50);

addRadioButton

public RadioButton addRadioButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a RadioButton to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of RadioButton from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of RadioButton from its left column, in unit of pixel.
height - Represents the height of RadioButton, in unit of pixel.
width - Represents the width of RadioButton, in unit of pixel.
Returns:
A RadioButton object.

Example:

//add a radio button
RadioButton radioButton = shapes.addRadioButton(1, 0, 1, 0, 100, 50);

addListBox

public ListBox addListBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ListBox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ListBox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ListBox from its left column, in unit of pixel.
height - Represents the height of ListBox, in unit of pixel.
width - Represents the width of ListBox, in unit of pixel.
Returns:
A ListBox object.

Example:

//add a list box
ListBox listBox = shapes.addListBox(1, 0, 1, 0, 100, 50);

addComboBox

public ComboBox addComboBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ComboBox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ComboBox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ComboBox from its left column, in unit of pixel.
height - Represents the height of ComboBox, in unit of pixel.
width - Represents the width of ComboBox, in unit of pixel.
Returns:
A ComboBox object.

Example:

//add a combo box
ComboBox comboBox = shapes.addComboBox(1, 0, 1, 0, 100, 50);

addGroupBox

public GroupBox addGroupBox(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a GroupBox to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of GroupBox from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of GroupBox from its left column, in unit of pixel.
height - Represents the height of GroupBox, in unit of pixel.
width - Represents the width of GroupBox, in unit of pixel.
Returns:
A GroupBox object.

Example:

//add a group box
GroupBox groupBox = shapes.addGroupBox(1, 0, 1, 0, 100, 50);

addButton

public Button addButton(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Button to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Button from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Button from its left column, in unit of pixel.
height - Represents the height of Button, in unit of pixel.
width - Represents the width of Button, in unit of pixel.
Returns:
A Button object.

Example:

//add a button
Button button = shapes.addButton(1, 0, 1, 0, 100, 50);

addLabel

public Label addLabel(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Label to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Label from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Label from its left column, in unit of pixel.
height - Represents the height of Label, in unit of pixel.
width - Represents the width of Label, in unit of pixel.
Returns:
A Label object.

Example:

//add a label
Label label = shapes.addLabel(1, 0, 1, 0, 100, 50);

addLabelInChart

public Label addLabelInChart(int top, int left, int height, int width)
Adds a label to the chart.
Parameters:
top - Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area.
left - Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area.
height - Represents the height of label, in units of 1/4000 of the chart area.
width - Represents the width of label, in units of 1/4000 of the chart area.
Returns:
A new Label object.

addTextBoxInChart

public TextBox addTextBoxInChart(int top, int left, int height, int width)
Adds a textbox to the chart.
Parameters:
top - Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.
left - Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.
height - Represents the height of textbox, in units of 1/4000 of the chart area.
width - Represents the width of textbox, in units of 1/4000 of the chart area.
Returns:
A TextBox object.

addTextEffectInChart

public Shape addTextEffectInChart(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int top, int left, int height, int width)
Inserts a WordArt object to the chart
Parameters:
effect - A MsoPresetTextEffect value. The mso preset text effect type.
text - The WordArt text.
fontName - The font name.
size - The font size
fontBold - Indicates whether font is bold.
fontItalic - Indicates whether font is italic.
top - Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area.
left - Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area.
height - Represents the height of shape, in units of 1/4000 of the chart area.
width - Represents the width of shape, in units of 1/4000 of the chart area.
Returns:
Returns a Shape object that represents the new WordArt object.

addTextEffect

public Shape addTextEffect(int effect, java.lang.String text, java.lang.String fontName, int size, boolean fontBold, boolean fontItalic, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Inserts a WordArt object.
Parameters:
effect - A MsoPresetTextEffect value. The mso preset text effect type.
text - The WordArt text.
fontName - The font name.
size - The font size
fontBold - Indicates whether font is bold.
fontItalic - Indicates whether font is italic.
upperLeftRow - Upper left row index.
top - Represents the vertical offset of shape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of shape from its left column, in unit of pixel.
height - Represents the height of shape, in unit of pixel.
width - Represents the width of shape, in unit of pixel.
Returns:
Returns a Shape object that represents the new WordArt object.

Example:

//add a WordArt
Shape wordArt1 = shapes.addTextEffect(MsoPresetTextEffect.TEXT_EFFECT_10, "WordArt", "arial", 18, false, false, 3, 0, 3, 0, 200, 50);

addWordArt

public Shape addWordArt(int style, java.lang.String text, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
                throws java.lang.Exception
Adds preset WordArt since Excel 2007.s
Parameters:
style - A PresetWordArtStyle value. The preset WordArt Style.
text - The text.
upperLeftRow - Upper left row index.
top - Represents the vertical offset of shape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of shape from its left column, in unit of pixel.
height - Represents the height of shape, in unit of pixel.
width - Represents the width of shape, in unit of pixel.
Returns:

Example:

//add a WordArt
Shape wordArt2 = shapes.addWordArt(PresetWordArtStyle.WORD_ART_STYLE_1, "WordArt", 3, 0, 3, 0, 50, 200);

addRectangle

public RectangleShape addRectangle(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a RectangleShape to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of RectangleShape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of RectangleShape from its left column, in unit of pixel.
height - Represents the height of RectangleShape, in unit of pixel.
width - Represents the width of RectangleShape, in unit of pixel.
Returns:
A RectangleShape object.

Example:

// add a rectangle
RectangleShape rectangleShape = shapes.addRectangle(2, 0, 2, 0, 130, 130);

addOval

public Oval addOval(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Oval to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Oval from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Oval from its left column, in unit of pixel.
height - Represents the height of Oval, in unit of pixel.
width - Represents the width of Oval, in unit of pixel.
Returns:
A Oval object.

Example:

//add a oval
Oval oval = shapes.addOval(1, 0, 1, 0, 50, 50);

addLine

public LineShape addLine(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a LineShape to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of LineShape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of LineShape from its left column, in unit of pixel.
height - Represents the height of LineShape, in unit of pixel.
width - Represents the width of LineShape, in unit of pixel.
Returns:
A LineShape object.

Example:

// add a line object
LineShape lineShape = shapes.addLine(1, 0, 1, 0, 100, 50);

addFreeFloatingShape

public Shape addFreeFloatingShape(int type, int top, int left, int height, int width, byte[] imageData, boolean isOriginalSize)
Adds a free floating shape to the worksheet.Only applies for line/image shape.
Parameters:
type - A MsoDrawingType value. The shape type.
top - Represents the vertical offset of shape from the worksheet's top row, in unit of pixel.
left - Represents the horizontal offset of shape from the worksheet's left column, in unit of pixel.
height - Represents the height of LineShape, in unit of pixel.
width - Represents the width of LineShape, in unit of pixel.
imageData - The image data,only applies for the picture.
isOriginalSize - Whether the shape use original size if the shape is image.
Returns:

Example:

//add a line
Shape floatingShape_Line = shapes.addFreeFloatingShape(MsoDrawingType.LINE, 100, 100, 100, 50, null, false);
//add a picture
byte[] imageData = null;
FileInputStream fs = new FileInputStream("image.jpg");
try //JAVA: was using
{
    int len = (int)fs.available();
    imageData = new byte[len];
    fs.read(imageData, 0, len);
}
finally { if (fs != null) fs.close(); }
Shape floatingShape_Picture = shapes.addFreeFloatingShape(MsoDrawingType.PICTURE, 200, 100, 100, 50, imageData, false);

addShapeInChart

public Shape addShapeInChart(int type, int placement, int left, int top, int right, int bottom, byte[] imageData)
Add a shape to chart .All unit is 1/4000 of chart area.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
left - In unit of 1/4000 chart area width.
top - In unit of 1/4000 chart area height.
right - In unit of 1/4000 chart area width.
bottom - In unit of 1/4000 chart area height.
imageData - If the shape is not a picture or ole object,imageData should be null.

addShapeInChart

public Shape addShapeInChart(int type, int placement, int left, int top, int right, int bottom)
Add a shape to chart .All unit is 1/4000 of chart area.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
left - In unit of 1/4000 chart area width.
top - In unit of 1/4000 chart area height.
right - In unit of 1/4000 chart area width.
bottom - In unit of 1/4000 chart area height.

addShapeInChartByScale

public Shape addShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom)
Add a shape to chart. All unit is percent scale of chart area.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
left - Unit is percent scale of chart area width.
top - Unit is percent scale of chart area height.
right - Unit is percent scale of chart area width.
bottom - Unit is percent scale of chart area height.

addShapeInChartByScale

public Shape addShapeInChartByScale(int type, int placement, double left, double top, double right, double bottom, byte[] imageData)
Add a shape to chart .All unit is 1/4000 of chart area.
Parameters:
type - A MsoDrawingType value. The drawing type.
placement - A PlacementType value. the placement type.
left - Unit is percent scale of chart area width.
top - Unit is percent scale of chart area height.
right - Unit is percent scale of chart area width.
bottom - Unit is percent scale of chart area height.
imageData - If the shape is not a picture or ole object,imageData should be null.

addArc

public ArcShape addArc(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a ArcShape to the worksheet.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of ArcShape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of ArcShape from its left column, in unit of pixel.
height - Represents the height of ArcShape, in unit of pixel.
width - Represents the width of ArcShape, in unit of pixel.
Returns:
A ArcShape object.

Example:

//add a arc
ArcShape arcShape = shapes.addArc(1, 0, 1, 0, 100, 50);

addShape

public Shape addShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a Shape to the worksheet. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox
Parameters:
type - A MsoDrawingType value. Mso drawing type.
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Shape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Shape from its left column, in unit of pixel.
height - Represents the height of Shape, in unit of pixel.
width - Represents the width of Shape, in unit of pixel.
Returns:
A Shape object.

Example:

//Add a shape of the specified type
Shape shapeByType = shapes.addShape(MsoDrawingType.CELLS_DRAWING, 1, 0, 1, 0, 100, 50);

addAutoShape

public Shape addAutoShape(int type, int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width)
Adds a AutoShape to the worksheet. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox
Parameters:
type - A AutoShapeType value. Auto shape type.
upperLeftRow - Upper left row index.
top - Represents the vertical offset of Shape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - Represents the horizontal offset of Shape from its left column, in unit of pixel.
height - Represents the height of Shape, in unit of pixel.
width - Represents the width of Shape, in unit of pixel.
Returns:
A Shape object.

Example:

//Adds a AutoShape to the worksheet.
Shape autoShape = shapes.addAutoShape(AutoShapeType.CUBE, 1, 0, 1, 0, 100, 50);

addAutoShapeInChart

public Shape addAutoShapeInChart(int type, int top, int left, int height, int width)
Adds a AutoShape to the chart. The type could not be Chart/Comment/Picture/OleObject/Polygon/DialogBox
Parameters:
type - A AutoShapeType value. Auto shape type.
top - Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.
left - Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.
height - Represents the height of textbox, in units of 1/4000 of the chart area.
width - Represents the width of textbox, in units of 1/4000 of the chart area.
Returns:
Returns a shape object.

addActiveXControl

public Shape addActiveXControl(int type, int topRow, int top, int leftColumn, int left, int width, int height)
                       throws java.lang.Exception
Creates an Activex Control.
Parameters:
type - A ControlType value. The type of the control.
topRow - Upper left row index.
top - Represents the vertical offset of Shape from its left row, in unit of pixel.
leftColumn - Upper left column index.
left - Represents the horizontal offset of Shape from its left column, in unit of pixel.
height - Represents the height of Shape, in unit of pixel.
width - Represents the width of Shape, in unit of pixel.
Returns:

Example:

//add an ActiveX control
Shape activeXControl = shapes.addActiveXControl(com.aspose.cells.ControlType.CHECK_BOX, 1, 0, 1, 0, 100, 50);

addPicture

public Picture addPicture(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn, java.io.InputStream stream)
Adds a picture to the collection.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
lowerRightRow - Lower right row index
lowerRightColumn - Lower right column index
stream - Stream object which contains the image data.
Returns:
Picture Picture object.

addPicture

public Picture addPicture(int upperLeftRow, int upperLeftColumn, java.io.InputStream stream, int widthScale, int heightScale)
                  throws java.lang.Exception
Adds a picture to the collection.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
stream - Stream object which contains the image data.
widthScale - Scale of image width, a percentage.
heightScale - Scale of image height, a percentage.
Returns:
Picture Picture object.

addSvg

public Picture addSvg(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] svgData, byte[] compatibleImageData)
              throws java.lang.Exception
Adds svg image.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of shape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - The horizontal offset of shape from its left column, in unit of pixel.
height - The height of shape, in unit of pixel.
width - The width of shape, in unit of pixel.
svgData - The svg image data.
compatibleImageData - Converted image data from svg in order to be compatible with Excel 2016 or lower versions.
Returns:

Example:

// add a svg
FileInputStream fs = new FileInputStream("image.svg");
try //JAVA: was using
{
    int len = (int)fs.available();
    byte[] imageData = new byte[len];
    fs.read(imageData, 0, len);
    Picture picture = shapes.addSvg(4, 0, 5, 0, -1, -1, imageData, null);
}
finally { if (fs != null) fs.close(); }

addIcons

public Picture addIcons(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageByteData, byte[] compatibleImageData)
                throws java.lang.Exception
Adds svg image.
Parameters:
upperLeftRow - Upper left row index.
top - Represents the vertical offset of shape from its left row, in unit of pixel.
upperLeftColumn - Upper left column index.
left - The horizontal offset of shape from its left column, in unit of pixel.
height - The height of shape, in unit of pixel.
width - The width of shape, in unit of pixel.
imageByteData - The image byte data.
compatibleImageData - Converted image data from svg in order to be compatible with Excel 2016 or lower versions.
Returns:

Example:

//add icon
FileInputStream fs = new FileInputStream("icon.svg");
try //JAVA: was using
{
    int len = (int)fs.available();
    byte[] imageData = new byte[len];
    fs.read(imageData, 0, len);
    Picture picture = shapes.addSvg(4, 0, 5, 0, -1, -1, imageData, null);
}
finally { if (fs != null) fs.close(); }

addLinkedPicture

public Picture addLinkedPicture(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
Add a linked picture.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
height - The height of the shape. In unit of pixels
width - The width of the shape. In unit of pixels
sourceFullName - The path and name of the source file for the linked image
Returns:
Picture Picture object.

addOleObjectWithLinkedImage

public OleObject addOleObjectWithLinkedImage(int upperLeftRow, int upperLeftColumn, int height, int width, java.lang.String sourceFullName)
Add a linked picture.
Parameters:
upperLeftRow - Upper left row index.
upperLeftColumn - Upper left column index.
height - The height of the shape. In unit of pixels
width - The width of the shape. In unit of pixels
sourceFullName - The path and name of the source file for the linked image
Returns:
Picture Picture object.

addPictureInChart

public Picture addPictureInChart(int top, int left, java.io.InputStream stream, int widthScale, int heightScale)
Adds a picture to the chart.
Parameters:
top - Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area.
left - Represents the horizontal offset of shape from the upper left corner in units of 1/4000 of the chart area.
stream - Stream object which contains the image data.
widthScale - Scale of image width, a percentage.
heightScale - Scale of image height, a percentage.
Returns:
Returns a Picture object.

addOleObject

public OleObject addOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, int width, byte[] imageData)
Parameters:
upperLeftRow -
top -
upperLeftColumn -
left -
height -
width -
imageData -
Returns:

Example:

FileInputStream fs = new FileInputStream("image.jpg");
try //JAVA: was using
{
    int len = (int)fs.available();
    byte[] imageData = new byte[len];
    fs.read(imageData, 0, len);
    OleObject oleObject = shapes.addOleObject(4, 0, 5, 0, 300, 500, imageData);
}
finally { if (fs != null) fs.close(); }

copyCommentsInRange

public void copyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
                        throws java.lang.Exception
Copy all comments in the range.
Parameters:
shapes - The source shapes.
ca - The source range.
destRow - The dest range start row.
destColumn - The dest range start column.

Example:

CommentCollection comments = workbook.getWorksheets().get(0).getComments();

//Add comment to cell A1
int commentIndex = comments.add(0, 0);
Comment comment = comments.get(commentIndex);
comment.setNote("First note.");
comment.getFont().setName("Times New Roman");

//Add comment to cell B2
comments.add("B2");
comment = comments.get("B2");
comment.setNote("Second note.");

CellArea area1 = new CellArea();
area1.StartColumn = 1;
area1.StartRow = 1;
area1.EndColumn = 5;
area1.EndRow = 4;

//copy
shapes.copyCommentsInRange(shapes, area1, 5, 1);

copyInRange

public void copyInRange(ShapeCollection sourceShapes, CellArea ca, int destRow, int destColumn, boolean isContained)
                throws java.lang.Exception
Copy shapes in the range to destination range.
Parameters:
sourceShapes - Source shapes.
ca - The source range.
destRow - The dest row index of the dest range.
destColumn - The dest column of the dest range.
isContained - Whether only copy the shapes which are contained in the range. If true,only copies the shapes in the range. Otherwise,it works as MS Office.

Example:

//add a shape
shapes.addRectangle(2, 0, 2, 0, 130, 130);
CellArea area2 = new CellArea();
area2.StartColumn = 1;
area2.StartRow = 1;
area2.EndColumn = 5;
area2.EndRow = 11;

//copy
shapes.copyInRange(shapes, area2, 12, 1, false);

deleteInRange

public void deleteInRange(CellArea ca)
Delete shapes in the range.Comment shapes will not be deleted.
Parameters:
ca - The range.If the shapes are contained in the range, they will be removed.

Example:

//add first shape
shapes.addRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.addRectangle(6, 0, 2, 0, 30, 30);

CellArea area3 = new CellArea();
area3.StartColumn = 0;
area3.StartRow = 5;
area3.EndColumn = 5;
area3.EndRow = 8;

//del
shapes.deleteInRange(area3);

deleteShape

public void deleteShape(Shape shape)
Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted.
Parameters:
shape -

Example:

//add first shape
Shape firstShape = shapes.addRectangle(2, 0, 2, 0, 50, 50);
//add second shape
Shape secondShape = shapes.addRectangle(6, 0, 2, 0, 30, 30);
//del
shapes.deleteShape(firstShape);

group

public GroupShape group(com.aspose.cells.Shape[] groupItems)
Group the shapes. The shape in the groupItems should not be grouped. The shape must be in this Shapes collection.
Parameters:
groupItems - the group items.
Returns:
Return the group shape.

Example:

//add first shape
shapes.addRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.addRectangle(6, 0, 2, 0, 30, 30);

Shape[] shapesArr = new Shape[] { shapes.get(0), shapes.get(1) };
GroupShape groupShape = shapes.group(shapesArr);

ungroup

public void ungroup(GroupShape group)
            throws java.lang.Exception
Ungroups the shape items. If the group shape is grouped by another group shape,nothing will be done.
Parameters:
group - The group shape.

Example:

//add first shape
shapes.addRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.addRectangle(6, 0, 2, 0, 30, 30);

//group
Shape[] shapesArr = new Shape[] { shapes.get(0), shapes.get(1) };
GroupShape groupShape = shapes.group(shapesArr);

//ungroup
shapes.ungroup(groupShape);

removeAt

public void removeAt(int index)
Remove the shape.
Parameters:
index - The index of the shape.

Example:

//add first shape
shapes.addRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.addRectangle(6, 0, 2, 0, 30, 30);

//remove 
shapes.removeAt(0);

remove

public void remove(Shape shape)
Remove the shape.
Parameters:
shape -

Example:

//add first shape
shapes.addRectangle(2, 0, 2, 0, 50, 50);
//add second shape
shapes.addRectangle(6, 0, 2, 0, 30, 30);

//get the shape
Shape s = shapes.get("Rectangle 1");// or shapes[0];
if (s != null)
{
    //remove 
    shapes.remove(s);
}

clear

public void clear()
Clear all shapes.

Example:

if (shapes.getCount() > 0)
{
    shapes.clear();
}

updateSelectedValue

public void updateSelectedValue()
                        throws java.lang.Exception
Update the selected value by the value of the linked cell of the shapes.

iterator

→ inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator()

contains

→ inherited from com.aspose.cells.CollectionBase
public boolean contains(java.lang.Object value)
Reserved for internal use.

add

→ inherited from com.aspose.cells.CollectionBase
public int add(java.lang.Object value)
Reserved for internal use.

indexOf

→ inherited from com.aspose.cells.CollectionBase
public int indexOf(java.lang.Object value)
Reserved for internal use.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.