Selection

Updated at:

This topic describes the APIs for the Selection object in spreadsheet documents.

Selection

Returns a Range or Shape object.

  • Syntax

    expression.Selection

    Expression: Document-type Application Object

  • Examples

    • Retrieve a Range object

      async function example() {
        await instance.ready();
      
        const app = instance.Application;
        
        // Get the Range object.
        const cells = await app.Selection;
      }
    • Retrieve a Shape object

      async function example() {
        await instance.ready();
      
        const app = instance.Application;
        
        // Get the Shape object.
        const shape = await app.Selection.Item(1);
      }