AboutSupportDeveloper GuideVersion 1.5.0

Represents the Excel application process.

Hierarchy

  • ExcelApplication

Properties

adapter: ExcelAdapter

Adapter process running in the background that functions as an intermediary between the client-side API and Microsoft’s Excel Interop API.

Methods

  • Creates a new Excel workbook.

    Returns Promise<ExcelWorkbook>

    The workbook that was created.

    Throws

    AdapterError if an exception is thrown by the adapter process, typically by the Excel PIA.

  • Gets all workbooks currently open in Excel.

    Returns Promise<ExcelWorkbook[]>

    All currently open workbooks.

    Throws

    AdapterError if an exception is thrown by the adapter process, typically by the Excel PIA.

  • Opens a workbook from a given file path.

    If the workbook file is already open in Excel, the existing Excel window will be given focus.

    Parameters

    • filePath: string

      Absolute path where the workbook file is located.

    Returns Promise<ExcelWorkbook>

    The workbook that was opened.

    Throws

    AdapterError if no workbook file was found at the given file path, or if an exception is thrown by the adapter process, typically by the Excel PIA.

  • Quits Excel closing all open workbooks in the process.

    If any open workbooks have unsaved changes, Excel displays a "Save" prompt before closing the workbook. You can prevent this by either saving all open workbooks prior to calling quit or by setting the displayAlerts parameter to false (be careful doing this though, any unsaved workbook changes will be lost).

    After calling this function do not attempt to use any existing workbook or worksheet objects. Doing so will likely result in an AdapterError since the underlying object/file is no longer available.

    Parameters

    • Optional displayAlerts: boolean

      Determines whether Excel will display a "Save" prompt for any workbooks with unsaved changes (defaults to true).

    Returns Promise<void>

    Throws

    AdapterError if an exception is thrown by the adapter process, typically by the Excel PIA.

Generated using TypeDoc