ExcelScript.Line interface
Represents a line inside a worksheet. To get the corresponding Shape
object, use Line.shape
.
Methods
connect |
Attaches the beginning of the specified connector to a specified shape. |
connect |
Attaches the end of the specified connector to a specified shape. |
disconnect |
Detaches the beginning of the specified connector from a shape. |
disconnect |
Detaches the end of the specified connector from a shape. |
get |
Represents the length of the arrowhead at the beginning of the specified line. |
get |
Represents the style of the arrowhead at the beginning of the specified line. |
get |
Represents the width of the arrowhead at the beginning of the specified line. |
get |
Represents the shape to which the beginning of the specified line is attached. |
get |
Represents the connection site to which the beginning of a connector is connected. Returns |
get |
Represents the connector type for the line. |
get |
Represents the length of the arrowhead at the end of the specified line. |
get |
Represents the style of the arrowhead at the end of the specified line. |
get |
Represents the width of the arrowhead at the end of the specified line. |
get |
Represents the shape to which the end of the specified line is attached. |
get |
Represents the connection site to which the end of a connector is connected. Returns |
get |
Specifies the shape identifier. |
get |
Specifies if the beginning of the specified line is connected to a shape. |
get |
Specifies if the end of the specified line is connected to a shape. |
get |
Returns the |
set |
Represents the length of the arrowhead at the beginning of the specified line. |
set |
Represents the style of the arrowhead at the beginning of the specified line. |
set |
Represents the width of the arrowhead at the beginning of the specified line. |
set |
Represents the connector type for the line. |
set |
Represents the length of the arrowhead at the end of the specified line. |
set |
Represents the style of the arrowhead at the end of the specified line. |
set |
Represents the width of the arrowhead at the end of the specified line. |
Method Details
connectBeginShape(shape, connectionSite)
Attaches the beginning of the specified connector to a specified shape.
connectBeginShape(shape: Shape, connectionSite: number): void;
Parameters
- shape
- ExcelScript.Shape
The shape to connect.
- connectionSite
-
number
The connection site on the shape to which the beginning of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive).
Returns
void
connectEndShape(shape, connectionSite)
Attaches the end of the specified connector to a specified shape.
connectEndShape(shape: Shape, connectionSite: number): void;
Parameters
- shape
- ExcelScript.Shape
The shape to connect.
- connectionSite
-
number
The connection site on the shape to which the end of the connector is attached. Must be an integer between 0 (inclusive) and the connection-site count of the specified shape (exclusive).
Returns
void
disconnectBeginShape()
Detaches the beginning of the specified connector from a shape.
disconnectBeginShape(): void;
Returns
void
disconnectEndShape()
Detaches the end of the specified connector from a shape.
disconnectEndShape(): void;
Returns
void
getBeginArrowheadLength()
Represents the length of the arrowhead at the beginning of the specified line.
getBeginArrowheadLength(): ArrowheadLength;
Returns
getBeginArrowheadStyle()
Represents the style of the arrowhead at the beginning of the specified line.
getBeginArrowheadStyle(): ArrowheadStyle;
Returns
getBeginArrowheadWidth()
Represents the width of the arrowhead at the beginning of the specified line.
getBeginArrowheadWidth(): ArrowheadWidth;
Returns
getBeginConnectedShape()
Represents the shape to which the beginning of the specified line is attached.
getBeginConnectedShape(): Shape;
Returns
getBeginConnectedSite()
Represents the connection site to which the beginning of a connector is connected. Returns null
when the beginning of the line is not attached to any shape.
getBeginConnectedSite(): number;
Returns
number
getConnectorType()
Represents the connector type for the line.
getConnectorType(): ConnectorType;
Returns
getEndArrowheadLength()
Represents the length of the arrowhead at the end of the specified line.
getEndArrowheadLength(): ArrowheadLength;
Returns
getEndArrowheadStyle()
Represents the style of the arrowhead at the end of the specified line.
getEndArrowheadStyle(): ArrowheadStyle;
Returns
getEndArrowheadWidth()
Represents the width of the arrowhead at the end of the specified line.
getEndArrowheadWidth(): ArrowheadWidth;
Returns
getEndConnectedShape()
Represents the shape to which the end of the specified line is attached.
getEndConnectedShape(): Shape;
Returns
getEndConnectedSite()
Represents the connection site to which the end of a connector is connected. Returns null
when the end of the line is not attached to any shape.
getEndConnectedSite(): number;
Returns
number
getId()
Specifies the shape identifier.
getId(): string;
Returns
string
getIsBeginConnected()
Specifies if the beginning of the specified line is connected to a shape.
getIsBeginConnected(): boolean;
Returns
boolean
getIsEndConnected()
Specifies if the end of the specified line is connected to a shape.
getIsEndConnected(): boolean;
Returns
boolean
getShape()
setBeginArrowheadLength(beginArrowheadLength)
Represents the length of the arrowhead at the beginning of the specified line.
setBeginArrowheadLength(beginArrowheadLength: ArrowheadLength): void;
Parameters
- beginArrowheadLength
- ExcelScript.ArrowheadLength
Returns
void
setBeginArrowheadStyle(beginArrowheadStyle)
Represents the style of the arrowhead at the beginning of the specified line.
setBeginArrowheadStyle(beginArrowheadStyle: ArrowheadStyle): void;
Parameters
- beginArrowheadStyle
- ExcelScript.ArrowheadStyle
Returns
void
setBeginArrowheadWidth(beginArrowheadWidth)
Represents the width of the arrowhead at the beginning of the specified line.
setBeginArrowheadWidth(beginArrowheadWidth: ArrowheadWidth): void;
Parameters
- beginArrowheadWidth
- ExcelScript.ArrowheadWidth
Returns
void
setConnectorType(connectorType)
Represents the connector type for the line.
setConnectorType(connectorType: ConnectorType): void;
Parameters
- connectorType
- ExcelScript.ConnectorType
Returns
void
setEndArrowheadLength(endArrowheadLength)
Represents the length of the arrowhead at the end of the specified line.
setEndArrowheadLength(endArrowheadLength: ArrowheadLength): void;
Parameters
- endArrowheadLength
- ExcelScript.ArrowheadLength
Returns
void
setEndArrowheadStyle(endArrowheadStyle)
Represents the style of the arrowhead at the end of the specified line.
setEndArrowheadStyle(endArrowheadStyle: ArrowheadStyle): void;
Parameters
- endArrowheadStyle
- ExcelScript.ArrowheadStyle
Returns
void
setEndArrowheadWidth(endArrowheadWidth)
Represents the width of the arrowhead at the end of the specified line.
setEndArrowheadWidth(endArrowheadWidth: ArrowheadWidth): void;
Parameters
- endArrowheadWidth
- ExcelScript.ArrowheadWidth
Returns
void
Office Scripts