[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Workbook.ImportData

ImportData Method

ImportData(string, string)

Import all the data of the specified source of the file.

Declaration
public static object[,] ImportData(string fileName, string sourceName)
Public Shared Function ImportData(fileName As String, sourceName As String) As Object(,)
Parameters
Type Name Description
string fileName

The path and name for the file.

string sourceName

The name of the data source. The source name could be:
worksheet "Sheet1"
table "Sheet1!Table1"
range "Sheet1!A1:C5"

Returns
Type Description
object[,]

An array for the data.

ImportData(string, string, int, int, int, int)

Import the data of a specified range from a file.

Declaration
public static object[,] ImportData(string fileName, string worksheetName, int row, int column, int rowCount, int columnCount)
Public Shared Function ImportData(fileName As String, worksheetName As String, row As Integer, column As Integer, rowCount As Integer, columnCount As Integer) As Object(,)
Parameters
Type Name Description
string fileName

The path and name for the file.

string worksheetName

The name of the worksheet.

int row

The first row of the range.

int column

The first column of the range.

int rowCount

The count of the rows.

int columnCount

The count of the columns.

Returns
Type Description
object[,]

An array for the data.

ImportData(Stream, string)

Import all the data of the specified source of the file.

Declaration
public static object[,] ImportData(Stream fileStream, string sourceName)
Public Shared Function ImportData(fileStream As Stream, sourceName As String) As Object(,)
Parameters
Type Name Description
Stream fileStream

The fileStream of a workbook.

string sourceName

The name of the data source. The source name could be:
worksheet "Sheet1"
table "Sheet1!Table1"
range "Sheet1!A1:C5"

Returns
Type Description
object[,]

An array for the data.

ImportData(Stream, string, int, int, int, int)

Import the data of a specified range from a fileStream.

Declaration
public static object[,] ImportData(Stream fileStream, string worksheetName, int row, int column, int rowCount, int columnCount)
Public Shared Function ImportData(fileStream As Stream, worksheetName As String, row As Integer, column As Integer, rowCount As Integer, columnCount As Integer) As Object(,)
Parameters
Type Name Description
Stream fileStream

The fileStream of a workbook.

string worksheetName

The name of the worksheet.

int row

The first row of the range.

int column

The first column of the range.

int rowCount

The count of the rows.

int columnCount

The count of the columns.

Returns
Type Description
object[,]

An array for the data.