04-24-2011, 01:45 PM
Hi Shyam,
1,2 are the Sheet indexes.
Syntax
1 --> Source Sheet which you want to import from
2 --> Destination Sheet to which you want to import
Example:
In external excel file:
sheet1 --> 1
sheet2 --> 2
In Datatable:
Global Datasheet --> 1
Action1 DataSheet --> 2
If we use Datatable.GetRowCount then it would return the no. of rows in Global Data sheet by-Default
So if we want to return the No. of rows in Action1 Datasheet then we have to use GetSheet method as given below.
1,2 are the Sheet indexes.
Syntax
Code:
DataTable.ImportSheet(FileName, SheetSource, SheetDest)
1 --> Source Sheet which you want to import from
2 --> Destination Sheet to which you want to import
Example:
In external excel file:
sheet1 --> 1
sheet2 --> 2
In Datatable:
Global Datasheet --> 1
Action1 DataSheet --> 2
If we use Datatable.GetRowCount then it would return the no. of rows in Global Data sheet by-Default
So if we want to return the No. of rows in Action1 Datasheet then we have to use GetSheet method as given below.
Code:
datatable.GetSheet("Action1").getrowcount