Property Getters/Setters Summary | ||
---|---|---|
method | getCount() | |
method | get(index) | |
Gets the shape object at the specific index. | ||
method | get(name) | |
Gets the shape object by the shape image |
Method Summary | ||
---|---|---|
method | addAutoShape(type, upperLeftRow, top, upperLeftColumn, left, height, width) | |
Adds a AutoShape to the worksheet. | ||
method | addAutoShapeInChart(type, top, left, height, width) | |
Adds a AutoShape to the chart. | ||
method | addCopy(sourceShape, upperLeftRow, top, upperLeftColumn, left) | |
Adds and copy a shape to the worksheet.. | ||
method | addFreeFloatingShape(type, top, left, height, width, imageData, isOriginalSize) | |
Adds a free floating shape to the worksheet.Only applies for line/image shape. | ||
method | addLabelInChart(top, left, height, width) | |
Adds a label to the chart. | ||
method | addLinkedPicture(upperLeftRow, upperLeftColumn, height, width, sourceFullName) | |
Add a linked picture. | ||
method | addOleObject(upperLeftRow, top, upperLeftColumn, left, height, width, imageData) | |
method | addOleObjectWithLinkedImage(upperLeftRow, upperLeftColumn, height, width, sourceFullName) | |
Add a linked picture. | ||
method | addPictureFromBytes(upperLeftRow, upperLeftColumn, byte_array, widthScale, heightScale) | |
Adds a picture to the collection. | ||
method | addPictureFromBytes(upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn, byte_array) | |
Adds a picture to the collection. | ||
method | addPictureInChartFromBytes(top, left, byte_array, widthScale, heightScale) | |
Adds a picture to the chart. | ||
method | addShape(type, upperLeftRow, top, upperLeftColumn, left, height, width) | |
Adds a Shape to the worksheet. | ||
method | addShapeInChart(type, placement, left, top, right, bottom) | |
Add a shape to chart .All unit is 1/4000 of chart area. | ||
method | addShapeInChart(type, placement, left, top, right, bottom, imageData) | |
Add a shape to chart .All unit is 1/4000 of chart area. | ||
method | addSvg(upperLeftRow, top, upperLeftColumn, left, height, width, svgData, compatibleImageData) | |
Adds svg image. | ||
method | addTextBoxInChart(top, left, height, width) | |
Adds a textbox to the chart. | ||
method | addTextEffect(effect, text, fontName, size, fontBold, fontItalic, upperLeftRow, top, upperLeftColumn, left, height, width) | |
Inserts a WordArt object. | ||
method | addTextEffectInChart(effect, text, fontName, size, fontBold, fontItalic, top, left, height, width) | |
Inserts a WordArt object to the chart | ||
method | addWordArt(style, text, upperLeftRow, top, upperLeftColumn, left, height, width) | |
Adds preset WordArt since Excel 2007.s | ||
method | clear() | |
Clear all shapes. | ||
method | contains(value) | → inherited from CollectionBase |
Reserved for internal use. | ||
method | copyCommentsInRange(shapes, ca, destRow, destColumn) | |
Copy all comments in the range. | ||
method | copyInRange(sourceShapes, ca, destRow, destColumn, isContained) | |
Copy shapes in the range to destination range. | ||
method | deleteInRange(ca) | |
Delete shapes in the range.Comment shapes will not be deleted. | ||
method | deleteShape(shape) | |
Delete a shape. If the shape is in the group or is a comment shape, it will not be deleted. | ||
method | get(index) | → inherited from CollectionBase |
Reserved for internal use. | ||
method | group(groupItems) | |
Group the shapes. | ||
method | indexOf(value) | → inherited from CollectionBase |
Reserved for internal use. | ||
method | iterator() | → inherited from CollectionBase |
method | remove(shape) | |
Remove the shape. | ||
method | removeAt(index) | |
Remove the shape. | ||
method | ungroup(group) | |
Ungroups the shape items. | ||
method | updateSelectedValue() | |
Update the selected value by the value of the linked cell of the shapes. |
Property Getters/Setters Detail |
---|
getCount : int | |
int getCount() |
get : Shape | |
Shape get(index) |
index
- get : Shape | |
Shape get(name) |
name
- Method Detail |
---|
addCopy | |
Shape addCopy(sourceShape, upperLeftRow, top, upperLeftColumn, left) |
sourceShape: Shape
- Source shape.upperLeftRow: int
- Upper left row index.top: int
- Represents the vertical offset of checkbox from its left row, in unit of pixel. upperLeftColumn: int
- Upper left column index.left: int
- Represents the horizontal offset of textbox from its left column, in unit of pixel. addLabelInChart | |
Label addLabelInChart(top, left, height, width) |
top: int
- Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area. left: int
- Represents the vertical offset of label from the upper left corner in units of 1/4000 of the chart area.height: int
- Represents the height of label, in units of 1/4000 of the chart area.width: int
- Represents the width of label, in units of 1/4000 of the chart area.addTextBoxInChart | |
TextBox addTextBoxInChart(top, left, height, width) |
top: int
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. left: int
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.height: int
- Represents the height of textbox, in units of 1/4000 of the chart area.width: int
- Represents the width of textbox, in units of 1/4000 of the chart area.addTextEffectInChart | |
Shape addTextEffectInChart(effect, text, fontName, size, fontBold, fontItalic, top, left, height, width) |
effect: int
- A text: String
- The WordArt text.fontName: String
- The font name.size: int
- The font sizefontBold: boolean
- Indicates whether font is bold.fontItalic: boolean
- Indicates whether font is italic.top: int
- Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area. left: int
- Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart area.height: int
- Represents the height of shape, in units of 1/4000 of the chart area.width: int
- Represents the width of shape, in units of 1/4000 of the chart area.addTextEffect | |
Shape addTextEffect(effect, text, fontName, size, fontBold, fontItalic, upperLeftRow, top, upperLeftColumn, left, height, width) |
effect: int
- A text: String
- The WordArt text.fontName: String
- The font name.size: int
- The font sizefontBold: boolean
- Indicates whether font is bold.fontItalic: boolean
- Indicates whether font is italic.upperLeftRow: int
- Upper left row index.top: int
- Represents the vertical offset of shape from its left row, in unit of pixel. upperLeftColumn: int
- Upper left column index.left: int
- Represents the horizontal offset of shape from its left column, in unit of pixel. height: int
- Represents the height of shape, in unit of pixel. width: int
- Represents the width of shape, in unit of pixel. addWordArt | |
Shape addWordArt(style, text, upperLeftRow, top, upperLeftColumn, left, height, width) |
style: int
- A text: String
- The text.upperLeftRow: int
- Upper left row index.top: int
- Represents the vertical offset of shape from its left row, in unit of pixel. upperLeftColumn: int
- Upper left column index.left: int
- Represents the horizontal offset of shape from its left column, in unit of pixel. height: int
- Represents the height of shape, in unit of pixel. width: int
- Represents the width of shape, in unit of pixel. addFreeFloatingShape | |
Shape addFreeFloatingShape(type, top, left, height, width, imageData, isOriginalSize) |
type: int
- A top: int
- Represents the vertical offset of shape from the worksheet's top row, in unit of pixel.left: int
- Represents the horizontal offset of shape from the worksheet's left column, in unit of pixel.height: int
- Represents the height of LineShape, in unit of pixel. width: int
- Represents the width of LineShape, in unit of pixel. imageData: byte[]
- The image data,only applies for the picture.isOriginalSize: boolean
- Whether the shape use original size if the shape is image.addShapeInChart | |
Shape addShapeInChart(type, placement, left, top, right, bottom, imageData) |
type: int
- A placement: int
- A left: int
- In unit of 1/4000 chart area width.top: int
- In unit of 1/4000 chart area height.right: int
- In unit of 1/4000 chart area width.bottom: int
- In unit of 1/4000 chart area height.imageData: byte[]
- If the shape is not a picture or ole object,imageData should be null.addShapeInChart | |
Shape addShapeInChart(type, placement, left, top, right, bottom) |
type: int
- A placement: int
- A left: int
- In unit of 1/4000 chart area width.top: int
- In unit of 1/4000 chart area height.right: int
- In unit of 1/4000 chart area width.bottom: int
- In unit of 1/4000 chart area height.addShape | |
Shape addShape(type, upperLeftRow, top, upperLeftColumn, left, height, width) |
type: int
- A upperLeftRow: int
- Upper left row index.top: int
- Represents the vertical offset of Shape from its left row, in unit of pixel. upperLeftColumn: int
- Upper left column index.left: int
- Represents the horizontal offset of Shape from its left column, in unit of pixel. height: int
- Represents the height of Shape, in unit of pixel. width: int
- Represents the width of Shape, in unit of pixel. addAutoShape | |
Shape addAutoShape(type, upperLeftRow, top, upperLeftColumn, left, height, width) |
type: int
- A upperLeftRow: int
- Upper left row index.top: int
- Represents the vertical offset of Shape from its left row, in unit of pixel. upperLeftColumn: int
- Upper left column index.left: int
- Represents the horizontal offset of Shape from its left column, in unit of pixel. height: int
- Represents the height of Shape, in unit of pixel. width: int
- Represents the width of Shape, in unit of pixel. addAutoShapeInChart | |
Shape addAutoShapeInChart(type, top, left, height, width) |
type: int
- A top: int
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area. left: int
- Represents the vertical offset of textbox from the upper left corner in units of 1/4000 of the chart area.height: int
- Represents the height of textbox, in units of 1/4000 of the chart area.width: int
- Represents the width of textbox, in units of 1/4000 of the chart area.addSvg | |
Picture addSvg(upperLeftRow, top, upperLeftColumn, left, height, width, svgData, compatibleImageData) |
upperLeftRow: int
- Upper left row index.top: int
- Represents the vertical offset of shape from its left row, in unit of pixel. upperLeftColumn: int
- Upper left column index.left: int
- The horizontal offset of shape from its left column, in unit of pixel. height: int
- The height of shape, in unit of pixel. width: int
- The width of shape, in unit of pixel. svgData: byte[]
- The svg image data.compatibleImageData: byte[]
- Converted image data from svg in order to be compatible with Excel 2016 or lower versions.addLinkedPicture | |
Picture addLinkedPicture(upperLeftRow, upperLeftColumn, height, width, sourceFullName) |
upperLeftRow: int
- Upper left row index.upperLeftColumn: int
- Upper left column index.height: int
- The height of the shape. In unit of pixelswidth: int
- The width of the shape. In unit of pixelssourceFullName: String
-
The path and name of the source file for the linked imageaddOleObjectWithLinkedImage | |
OleObject addOleObjectWithLinkedImage(upperLeftRow, upperLeftColumn, height, width, sourceFullName) |
upperLeftRow: int
- Upper left row index.upperLeftColumn: int
- Upper left column index.height: int
- The height of the shape. In unit of pixelswidth: int
- The width of the shape. In unit of pixelssourceFullName: String
-
The path and name of the source file for the linked imageaddOleObject | |
OleObject addOleObject(upperLeftRow, top, upperLeftColumn, left, height, width, imageData) |
upperLeftRow: int
- top: int
- upperLeftColumn: int
- left: int
- height: int
- width: int
- imageData: byte[]
- copyCommentsInRange | |
copyCommentsInRange(shapes, ca, destRow, destColumn) |
shapes: ShapeCollection
- The source shapes.ca: CellArea
- The source range.destRow: int
- The dest range start row.destColumn: int
- The dest range start column.copyInRange | |
copyInRange(sourceShapes, ca, destRow, destColumn, isContained) |
sourceShapes: ShapeCollection
- Source shapes.ca: CellArea
- The source range.destRow: int
- The dest row index of the dest range.destColumn: int
- The dest column of the dest range.isContained: boolean
- 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.deleteInRange | |
deleteInRange(ca) |
ca: CellArea
- The range.If the shapes are contained in the range, they will be removed.deleteShape | |
deleteShape(shape) |
shape: Shape
- group | |
GroupShape group(groupItems) |
groupItems: Shape[]
- the group items.ungroup | |
ungroup(group) |
group: GroupShape
- The group shape.removeAt | |
removeAt(index) |
index: int
- The index of the shape.remove | |
remove(shape) |
shape: Shape
- clear | |
clear() |
updateSelectedValue | |
updateSelectedValue() |
iterator | |
Iterator iterator() |
get | |
Object get(index) |
contains | |
boolean contains(value) |
indexOf | |
int indexOf(value) |
addPictureFromBytes | |
addPictureFromBytes(upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn, byte_array) |
upperLeftRow: int
- Upper left row indexupperLeftColumn: int
- Upper left column indexlowerRightRow: int
- Lower right row indexlowerRightColumn: int
- Lower right column indexbyte_array: bytes
- The byte arrayExample:
import jpype import asposecells jpype.startJVM() from asposecells.api import * wb = Workbook(FileFormatType.XLSX) with open('cells.png', 'rb') as pic: pic_bytes = pic.read() wb.getWorksheets().get(0).getShapes().addPictureFromBytes(2, 7, lowerRightRow=10, lowerRightColumn=10, byte_array=pic_bytes) wb.save("wb.xlsx") jpype.shutdownJVM()
addPictureFromBytes | |
addPictureFromBytes(upperLeftRow, upperLeftColumn, byte_array, widthScale, heightScale) |
upperLeftRow: int
- Upper left row indexupperLeftColumn: int
- Upper left column indexbyte_array: bytes
- The byte arraywidthScale: int
- Scale of image width, a percentageheightScale: int
- Scale of image height, a percentageExample:
import jpype import asposecells jpype.startJVM() from asposecells.api import * wb = Workbook(FileFormatType.XLSX) with open('cells.png', 'rb') as pic: pic_bytes = pic.read() wb.getWorksheets().get(0).getShapes().addPictureFromBytes(2, 0, byte_array=pic_bytes, widthScale=200, heightScale=150) wb.save("wb.xlsx") jpype.shutdownJVM()
addPictureInChartFromBytes | |
addPictureInChartFromBytes(top, left, byte_array, widthScale, heightScale) |
top: int
- Represents the vertical offset of shape from the upper left corner in units of 1/4000 of the chart arealeft: int
- Represents the horizontal offset of shape from the upper left corner in units of 1/4000 of the chart areabyte_array: bytes
- The byte arraywidthScale: int
- Scale of image width, a percentageheightScale: int
- Scale of image height, a percentageExample:
import jpype import asposecells jpype.startJVM() from asposecells.api import * wb = Workbook('Book2.xlsx') shapes = wb.getWorksheets().get("Chart").getCharts().get(0).getShapes() with open('cells.png', 'rb') as pic: picture = shapes.addPictureInChartFromBytes(1, 1, pic.read(), 10, 5) wb.save("wb.xlsx") jpype.shutdownJVM()