[]
        
(Showing Draft Content)

FarPoint.Web.Spread.SheetView.OpenExcel

OpenExcel Method

OpenExcel(string, string)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(string fileName, string sheetName)
Public Function OpenExcel(fileName As String, sheetName As String) As Boolean
Parameters
Type Name Description
string fileName

Name of the file to open

string sheetName

Name of the sheet in the Excel file to load

Returns
Type Description
bool

OpenExcel(string, int)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(string fileName, int excelSheetIndex)
Public Function OpenExcel(fileName As String, excelSheetIndex As Integer) As Boolean
Parameters
Type Name Description
string fileName

Name of the file to open

int excelSheetIndex

Index of the sheet in the Excel file to load

Returns
Type Description
bool
Exceptions
Type Condition
ExcelException

Specified sheet in Excel is invalid; index must be between 0 and the number of sheets

OpenExcel(Stream, string)

Opens an Excel file and load the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(Stream stream, string sheetName)
Public Function OpenExcel(stream As Stream, sheetName As String) As Boolean
Parameters
Type Name Description
Stream stream

Stream containing an Excel Compound Document File

string sheetName

Name of sheet in Excel to load

Returns
Type Description
bool

OpenExcel(Stream, int)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(Stream stream, int excelSheetIndex)
Public Function OpenExcel(stream As Stream, excelSheetIndex As Integer) As Boolean
Parameters
Type Name Description
Stream stream

Stream containing an Excel Compound Document File

int excelSheetIndex

Index of the Excel sheet to load

Returns
Type Description
bool
Exceptions
Type Condition
ExcelException

Specified sheet in Excel is invalid; index must be between 0 and the number of sheets

OpenExcel(Stream, string, ExcelOpenFlags)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(Stream stream, string sheetName, ExcelOpenFlags excelOpenFlags)
Public Function OpenExcel(stream As Stream, sheetName As String, excelOpenFlags As ExcelOpenFlags) As Boolean
Parameters
Type Name Description
Stream stream

Stream that contains an Excel Compound Document File

string sheetName

Name of sheet in Excel to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

Returns
Type Description
bool

OpenExcel(Stream, string, ExcelOpenFlags, string)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(Stream stream, string sheetName, ExcelOpenFlags excelOpenFlags, string password)
Public Function OpenExcel(stream As Stream, sheetName As String, excelOpenFlags As ExcelOpenFlags, password As String) As Boolean
Parameters
Type Name Description
Stream stream

Stream that contains an Excel Compound Document File

string sheetName

Name of sheet in Excel to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

string password

The password

Returns
Type Description
bool

OpenExcel(Stream, int, ExcelOpenFlags)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(Stream stream, int excelSheetIndex, ExcelOpenFlags excelOpenFlags)
Public Function OpenExcel(stream As Stream, excelSheetIndex As Integer, excelOpenFlags As ExcelOpenFlags) As Boolean
Parameters
Type Name Description
Stream stream

Stream that contains an Excel Compound Document File

int excelSheetIndex

Index of the Excel sheet to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

Returns
Type Description
bool

OpenExcel(Stream, int, ExcelOpenFlags, string)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(Stream stream, int excelSheetIndex, ExcelOpenFlags excelOpenFlags, string password)
Public Function OpenExcel(stream As Stream, excelSheetIndex As Integer, excelOpenFlags As ExcelOpenFlags, password As String) As Boolean
Parameters
Type Name Description
Stream stream

Stream that contains an Excel Compound Document File

int excelSheetIndex

Index of the Excel sheet to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

string password

The password

Returns
Type Description
bool

OpenExcel(string, string, ExcelOpenFlags)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(string fileName, string sheetName, ExcelOpenFlags excelOpenFlags)
Public Function OpenExcel(fileName As String, sheetName As String, excelOpenFlags As ExcelOpenFlags) As Boolean
Parameters
Type Name Description
string fileName

Name of the file to open

string sheetName

Name of the sheet in the Excel file to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

Returns
Type Description
bool

OpenExcel(string, string, ExcelOpenFlags, string)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(string fileName, string sheetName, ExcelOpenFlags excelOpenFlags, string password)
Public Function OpenExcel(fileName As String, sheetName As String, excelOpenFlags As ExcelOpenFlags, password As String) As Boolean
Parameters
Type Name Description
string fileName

Name of the file to open

string sheetName

Name of the sheet in the Excel file to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

string password

The password

Returns
Type Description
bool

OpenExcel(string, int, ExcelOpenFlags)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(string fileName, int excelSheetIndex, ExcelOpenFlags excelOpenFlags)
Public Function OpenExcel(fileName As String, excelSheetIndex As Integer, excelOpenFlags As ExcelOpenFlags) As Boolean
Parameters
Type Name Description
string fileName

Name of the file to open

int excelSheetIndex

Index of the sheet in the Excel file to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

Returns
Type Description
bool

OpenExcel(string, int, ExcelOpenFlags, string)

Opens an Excel file and loads the specified Excel sheet into this sheet.

Declaration
public bool OpenExcel(string fileName, int excelSheetIndex, ExcelOpenFlags excelOpenFlags, string password)
Public Function OpenExcel(fileName As String, excelSheetIndex As Integer, excelOpenFlags As ExcelOpenFlags, password As String) As Boolean
Parameters
Type Name Description
string fileName

Name of the file to open

int excelSheetIndex

Index of the sheet in the Excel file to load

ExcelOpenFlags excelOpenFlags

Flags to specify file open options

string password

The password

Returns
Type Description
bool