ws.objects
WorksheetObjectCollection
16 methods
get
→ Promise<FloatingObjectHandle | null>get(id: string): Promise<FloatingObjectHandle | null>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Get a floating object handle by ID. Returns null if not found.
getInfo
→ Promise<FloatingObjectInfo | null>getInfo(id: string): Promise<FloatingObjectInfo | null>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Get summary info (with spatial fields) for a floating object. Returns null if not found.
list
→ Promise<FloatingObjectHandle[]>list(): Promise<FloatingObjectHandle[]>;List all floating objects on the sheet.
deleteMany
→ Promise<number>deleteMany(ids: string[]): Promise<number>;| Parameter | Type | Required |
|---|---|---|
| ids | string[] | required |
Delete multiple floating objects. Returns count of successfully deleted.
delete
→ Promise<boolean>delete(id: string): Promise<boolean>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Delete a single floating object by ID. Returns true if deleted.
bringToFront
→ Promise<void>bringToFront(id: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Bring a floating object to the front (highest z-order).
sendToBack
→ Promise<void>sendToBack(id: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Send a floating object to the back (lowest z-order).
bringForward
→ Promise<void>bringForward(id: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Bring a floating object forward by one layer.
sendBackward
→ Promise<void>sendBackward(id: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Send a floating object backward by one layer.
update
→ Promise<void>update(objectId: string, updates: Record<string, unknown>): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| objectId | string | required |
| updates | Record<string, unknown> | required |
Update arbitrary properties of a floating object.
convertToWordArt
→ Promise<void>convertToWordArt(objectId: string, presetId?: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| objectId | string | required |
| presetId | string | optional |
Convert a text box to WordArt by applying WordArt styling.
convertToTextBox
→ Promise<void>convertToTextBox(objectId: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| objectId | string | required |
Convert WordArt back to a regular text box by removing WordArt styling.
computeObjectBounds
→ Promise<ObjectBounds | null>computeObjectBounds(objectId: string): Promise<ObjectBounds | null>;| Parameter | Type | Required |
|---|---|---|
| objectId | string | required |
Compute pixel bounding box for a floating object (async — uses ComputeBridge).
computeAllObjectBounds
→ Promise<Map<string, ObjectBounds>>computeAllObjectBounds(): Promise<Map<string, ObjectBounds>>;Batch-compute pixel bounds for all floating objects on this sheet.
group
→ Promise<string>group(ids: string[]): Promise<string>;| Parameter | Type | Required |
|---|---|---|
| ids | string[] | required |
Group multiple floating objects. Returns the group ID.
ungroup
→ Promise<void>ungroup(groupId: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| groupId | string | required |
Ungroup a floating object group.