Spread for ASP.NET 7.0 Product Documentation
GetExcelSheetNames(Stream,String) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class > GetExcelSheetNames Method : GetExcelSheetNames(Stream,String) Method


stream
Stream that contains an Excel Compound Storage file
password
The password

Glossary Item Box

Gets an array of sheet names from the specified Excel file from a stream.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function GetExcelSheetNames( _
   ByVal stream As Stream, _
   ByVal password As String _
) As String()
Visual Basic (Usage)Copy Code
Dim stream As Stream
Dim password As String
Dim value() As String
 
value = FpSpread.GetExcelSheetNames(stream, password)
C# 
public static string[] GetExcelSheetNames( 
   Stream stream,
   string password
)

Parameters

stream
Stream that contains an Excel Compound Storage file
password
The password

Example

This example uses the GetExcelSheetNames method.
C#Copy Code
string f;
f = "D:\\formula1.xls";
System.IO.FileStream s = new System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.Read);
string[] sheetNames = null;
sheetNames = FarPoint.Web.Spread.FpSpread.GetExcelSheetNames(s, "test");
int i;
for (i = 0; i <= sheetNames.Length - 1; i++)
{
    ListBox1.Items.Add(sheetNames[i]);
}
Visual BasicCopy Code
Dim f As String
f = "D:\formula1.xls"
Dim s As New System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim sheetNames As String()
sheetNames = FpSpread1.GetExcelSheetNames(s, "test")
Dim i As Integer
For i = 0 To sheetNames.Length - 1
    ListBox1.Items.Add(sheetNames(i)) 
Next

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.