Spread for ASP.NET 11 Product Documentation
GetExcelSheetNames(String,String) Method
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class > GetExcelSheetNames Method : GetExcelSheetNames(String,String) Method
Path and filename of Excel file
The password
Gets an array of sheet names from the specified Excel file.
Syntax
'Declaration
 
Public Overloads Shared Function GetExcelSheetNames( _
   ByVal fileName As String, _
   ByVal password As String _
) As String()
'Usage
 
Dim fileName As String
Dim password As String
Dim value() As String
 
value = FpSpread.GetExcelSheetNames(fileName, password)
public static string[] GetExcelSheetNames( 
   string fileName,
   string password
)

Parameters

fileName
Path and filename of Excel file
password
The password
Example
This example uses the GetExcelSheetNames method.
string[] sheetNames = null;
sheetNames = FarPoint.Web.Spread.FpSpread.GetExcelSheetNames("D:\\ALM.xls", "test");
int i;
for (i = 0; i <= sheetNames.Length - 1; i++)
{
    ListBox1.Items.Add(sheetNames[i]);
}
Dim sheetNames As String() = Nothing
sheetNames = FpSpread1.GetExcelSheetNames("D:\ALM.xls", "test")
Dim i As Integer
For i = 0 To sheetNames.Length - 1
    ListBox1.Items.Add(sheetNames(i))
Next 
See Also

Reference

FpSpread Class
FpSpread Members
Overload List