StaSpreadsheet.OpenFromEnterprise

This function loads a spreadsheet from a spreadsheet previously saved to enterprise as a 'General Document'.

Syntax Parameters Return Value
Sub StaSpreadsheet.OpenFromEnterprise( _
    ObjectManager As Object, _
    pathOrId As Variant, _
    Optional revision As Long = 0)
  • ObjectManager [in]

The Enterprise session to connect with.

Type: Object

  • pathOrId [in]

The Enterprise path or ID of the spreadsheet.

Type: Variant

  • revision [in,optional]

A specific version of the spreadsheet to open.

Type: Long

Default value: 0

This function does not return a value.

SVB Example

Opening a spreadsheet from Enterprise:

Sub Main

    Dim oOM As ObjectManager
    'Reconnect into Enterprise
    Set oOM = New ObjectManager
    oOM.Reconnect Application

    'Open the dataset from Enterprise into an in-memory spreadsheet
    Dim spr As New StaSpreadsheet
    spr.OpenFromEnterprise(oOM, _
        "/Blake's Materials/Cat Clinic Patient Info.sta") 'Insert path to your STA file here

    'Connect the in-memory spreadsheeet to a regular spreadsheet and show it
    Dim mySpr As Spreadsheet
    Set mySpr = Application.SpreadsheetFromStaSpreadsheet(spr)
    mySpr.Visible = True

    spr.Close
    oOM.Disconnect

End Sub