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.
removeMany
→ Promise<number>removeMany(ids: string[]): Promise<number>;| Parameter | Type | Required |
|---|---|---|
| ids | string[] | required |
Remove multiple floating objects. Returns count of successfully removed.
remove
→ Promise<boolean>remove(id: string): Promise<boolean>;| Parameter | Type | Required |
|---|---|---|
| id | string | required |
Remove a single floating object by ID. Returns true if removed.
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, warpPreset?: TextWarpPreset): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| objectId | string | required |
| warpPreset | TextWarpPreset | optional |
Convert a text box to decorative text by applying text-effect styling.
convertToTextBox
→ Promise<void>convertToTextBox(objectId: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| objectId | string | required |
Convert decorative text back to a regular text box by removing text-effect 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.