public class LineShape extends Shape
Example
//Instantiate a new Workbook.
Workbook workbook = new Workbook();
//Get the first worksheet in the book.
Worksheet worksheet = workbook.getWorksheets().get(0);
//Add a new line to the worksheet.
LineShape line1 = worksheet.getShapes().addLine(5, 0, 1, 0, 0, 250);
//Set the line dash style
line1.getLine().setDashStyle(MsoLineDashStyle.SOLID);
//Set the placement.
line1.setPlacement(PlacementType.FREE_FLOATING);
//Add another line to the worksheet.
LineShape line2 = worksheet.getShapes().addLine(7, 0, 1, 0, 85, 250);
//Set the line dash style.
line2.getLine().setDashStyle(MsoLineDashStyle.DASH_LONG_DASH);
//Set the weight of the line.
line2.getLine().setWeight(4);
//Set the placement.
line2.setPlacement(PlacementType.FREE_FLOATING);
//Add the third line to the worksheet.
LineShape line3 = worksheet.getShapes().addLine(13, 0, 1, 0, 0, 250);
//Set the line dash style
line3.getLine().setDashStyle(MsoLineDashStyle.SOLID);
//Set the placement.
line3.setPlacement(PlacementType.FREE_FLOATING);
//Make the gridlines invisible in the first worksheet.
workbook.getWorksheets().get(0).setGridlinesVisible(false);
//Save the excel file.
workbook.save("tstlines.xls");
| Modifier and Type | Method and Description |
|---|---|
int |
getBeginArrowheadLength()
Deprecated.
Use Shape.Line.BeginArrowheadLength property instead.
|
int |
getBeginArrowheadStyle()
Deprecated.
Use Shape.Line.BeginArrowheadStyle property instead.
|
int |
getBeginArrowheadWidth()
Deprecated.
Use Shape.Line.BeginArrowheadWidth property instead.
|
int |
getEndArrowheadLength()
Deprecated.
Use Shape.Line.EndArrowheadLength property instead.
|
int |
getEndArrowheadStyle()
Deprecated.
Use Shape.Line.EndArrowheadStyle property instead.
|
int |
getEndArrowheadWidth()
Deprecated.
Use Shape.Line.EndArrowheadWidth property instead.
|
void |
setBeginArrowheadLength(int value)
Deprecated.
Use Shape.Line.BeginArrowheadLength property instead.
|
void |
setBeginArrowheadStyle(int value)
Deprecated.
Use Shape.Line.BeginArrowheadStyle property instead.
|
void |
setBeginArrowheadWidth(int value)
Deprecated.
Use Shape.Line.BeginArrowheadWidth property instead.
|
void |
setEndArrowheadLength(int value)
Deprecated.
Use Shape.Line.EndArrowheadLength property instead.
|
void |
setEndArrowheadStyle(int value)
Deprecated.
Use Shape.Line.EndArrowheadStyle property instead.
|
void |
setEndArrowheadWidth(int value)
Deprecated.
Use Shape.Line.EndArrowheadWidth property instead.
|
addHyperlink, alignTopRightCorner, calculateTextSize, characters, fitToTextSize, formatCharacters, getActiveXControl, getActualBox, getActualLowerRightRow, getAlternativeText, getAnchorType, getAutoShapeType, getBottom, getCharacters, getConnectionPoints, getControlData, getCreateId, getFill, getFillFormat, getFont, getFormatPicture, getGeometry, getGlow, getGroup, getHeight, getHeightCM, getHeightInch, getHeightInShape, getHeightPt, getHeightScale, getHtmlText, getHyperlink, getId, getInputRange, getInputRange, getLeft, getLeftCM, getLeftInch, getLeftInShape, getLeftToCorner, getLine, getLineFormat, getLinkedCell, getLinkedCell, getLockedProperty, getLowerDeltaX, getLowerDeltaY, getLowerRightColumn, getLowerRightRow, getMacroName, getMsoDrawingType, getName, getPaths, getPlacement, getReflection, getRelativeToOriginalPictureSize, getResultOfSmartArt, getRichFormattings, getRight, getRotationAngle, getShadowEffect, getSoftEdges, getSpid, getSpt, getText, getTextBody, getTextBoxOptions, getTextDirection, getTextEffect, getTextHorizontalAlignment, getTextHorizontalOverflow, getTextOptions, getTextOrientationType, getTextShapeType, getTextVerticalAlignment, getTextVerticalOverflow, getThreeDFormat, getTitle, getTop, getTopCM, getTopInch, getTopInShape, getTopToCorner, getType, getUpperDeltaX, getUpperDeltaY, getUpperLeftColumn, getUpperLeftRow, getWidth, getWidthCM, getWidthInch, getWidthInShape, getWidthPt, getWidthScale, getWorksheet, getX, getY, getZOrderPosition, hasLine, isAspectRatioLocked, isDecorative, isEquation, isFilled, isFlippedHorizontally, isFlippedVertically, isGroup, isHidden, isInGroup, isLockAspectRatio, isLocked, isPrintable, isRichText, isSameSetting, isSmartArt, isTextWrapped, isWordArt, moveToRange, removeActiveXControl, removeHyperlink, setAlternativeText, setAnchorType, setAspectRatioLocked, setAutoShapeType, setBottom, setCreateId, setDecorative, setFilled, setFlippedHorizontally, setFlippedVertically, setFont, setHasLine, setHeight, setHeightCM, setHeightInch, setHeightInShape, setHeightPt, setHeightScale, setHidden, setHtmlText, setInputRange, setInputRange, setLeft, setLeftCM, setLeftInch, setLeftInShape, setLeftToCorner, setLinkedCell, setLinkedCell, setLockAspectRatio, setLocked, setLockedProperty, setLowerDeltaX, setLowerDeltaY, setLowerRightColumn, setLowerRightRow, setMacroName, setName, setPlacement, setPrintable, setRelativeToOriginalPictureSize, setRight, setRotationAngle, setSoftEdges, setText, setTextDirection, setTextHorizontalAlignment, setTextHorizontalOverflow, setTextOptions, setTextOrientationType, setTextShapeType, setTextVerticalAlignment, setTextVerticalOverflow, setTextWrapped, setTitle, setTop, setTopCM, setTopInch, setTopInShape, setTopToCorner, setUpperDeltaX, setUpperDeltaY, setUpperLeftColumn, setUpperLeftRow, setWidth, setWidthCM, setWidthInch, setWidthInShape, setWidthPt, setWidthScale, setX, setY, setZOrderPosition, toFrontOrBack, toImage, toImage, toImage, updateSelectedValuepublic int getBeginArrowheadStyle()
See MsoArrowheadStyle.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public void setBeginArrowheadStyle(int value)
See MsoArrowheadStyle.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public int getBeginArrowheadWidth()
See MsoArrowheadWidth.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public void setBeginArrowheadWidth(int value)
See MsoArrowheadWidth.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public int getBeginArrowheadLength()
See MsoArrowheadLength.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public void setBeginArrowheadLength(int value)
See MsoArrowheadLength.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.BeginArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public int getEndArrowheadStyle()
See MsoArrowheadStyle.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public void setEndArrowheadStyle(int value)
See MsoArrowheadStyle.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadStyle property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public int getEndArrowheadWidth()
See MsoArrowheadWidth.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public void setEndArrowheadWidth(int value)
See MsoArrowheadWidth.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadWidth property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public int getEndArrowheadLength()
See MsoArrowheadLength.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.public void setEndArrowheadLength(int value)
See MsoArrowheadLength.
Remarks
NOTE: This member is now obsolete. Instead, please use Shape.Line.EndArrowheadLength property. This property will be removed 12 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.