[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Workbook.ImportData

ImportData Method

ImportData(string, string)

导入指定文件源的所有数据。

Declaration
public static object[,] ImportData(string fileName, string sourceName)
Parameters
Type Name Description
string fileName

文件的路径和名称。

string sourceName

数据源的名称。源名称可能是:
worksheet "Sheet1"
table "Sheet1!Table1"
range "Sheet1!A1:C5"

Returns
Type Description
object[,]

数据数组。

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

从文件导入指定范围的数据。

Declaration
public static object[,] ImportData(string fileName, string worksheetName, int row, int column, int rowCount, int columnCount)
Parameters
Type Name Description
string fileName

文件的路径和名称。

string worksheetName

工作表的名称。

int row

范围的起始行。

int column

范围的起始列。

int rowCount

行数。

int columnCount

列数。

Returns
Type Description
object[,]

数据数组。

ImportData(Stream, string)

导入指定文件源的所有数据。

Declaration
public static object[,] ImportData(Stream fileStream, string sourceName)
Parameters
Type Name Description
Stream fileStream

工作簿的文件流。

string sourceName

数据源的名称。源名称可能是:
worksheet "Sheet1"
table "Sheet1!Table1"
range "Sheet1!A1:C5"

Returns
Type Description
object[,]

数据数组。

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

从文件流中导入指定范围的数据。

Declaration
public static object[,] ImportData(Stream fileStream, string worksheetName, int row, int column, int rowCount, int columnCount)
Parameters
Type Name Description
Stream fileStream

工作簿的文件流。

string worksheetName

工作表的名称。

int row

范围的起始行。

int column

范围的起始列。

int rowCount

行的数量。

int columnCount

列的数量。

Returns
Type Description
object[,]

数据数组。