Share via


ExcelService.GetSheetNames Method

Gets a list of all of the sheet names present in a workbook.

Namespace:  Microsoft.Office.Excel.Server.WebServices
Assembly:  Microsoft.Office.Excel.Server.WebServices (in Microsoft.Office.Excel.Server.WebServices.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Function GetSheetNames ( _
    sessionId As String, _
    <OutAttribute> ByRef status As Status() _
) As SheetInfo()
'Usage
Dim instance As ExcelService
Dim sessionId As String
Dim status As Status()
Dim returnValue As SheetInfo()

returnValue = instance.GetSheetNames(sessionId, _
    status)
[WebMethodAttribute]
public SheetInfo[] GetSheetNames(
    string sessionId,
    out Status[] status
)

Parameters

  • sessionId
    Type: System.String

    The Excel Web Services session ID.

  • status
    Type: []

    Alert information.

Return Value

Type: []
The SheetInfo information about a sheet in a workbook..

Remarks

The method also returns the type of sheet (worksheets and chartsheets) and the visibility of the sheet (visible, hidden, and very hidden). For more information, see SheetType and SheetVisibility.

This method works with view only, read and edit permissions. If the user has view only permissions, only visible and published sheets are returned.

See Also

Reference

ExcelService Class

ExcelService Members

Microsoft.Office.Excel.Server.WebServices Namespace