Thursday, July 24, 2008
Import Excel sheet or Files
Datatable.import(“C:\sheet.xls”)
Import sheet method
Datatable.importsheet(Filename, sheetsource, Sheetdest)
Filename = File location
Sheetsource = sheet name (Start from index 1)
Sheetdesignation = Particular location (Start from index 1)
DataTable.ImportSheet "C:\sheet.xls" ,1 ,"name"
Import sheet method
Datatable.importsheet(Filename, sheetsource, Sheetdest)
Filename = File location
Sheetsource = sheet name (Start from index 1)
Sheetdesignation = Particular location (Start from index 1)
DataTable.ImportSheet "C:\sheet.xls" ,1 ,"name"
GetRowCount Method
rowcont = DataTable.GetSheet("MySheet").GetRowCount
Reporter.ReportEvent 2, "There are " &rowcont, "rows in the data sheet."
Reporter.ReportEvent 2, "There are " &rowcont, "rows in the data sheet."
Call the Excel Sheet in to Test Script:
Add sheet
DataTable. Addsheet(“Mysheet”).Add Parameter(“Time”,”8.00”)
Delete sheet
DataTable. Deletesheet(“Mysheet”)
SheetID : Index value begin’s with 1
Export file
DataTable.export(“FileName”)
Export sheet
DataTable.exportsheet(“FileName”,SheetID)
FileName: String location
SheetID: Index values begin with 1
DataTable. Addsheet(“Mysheet”).Add Parameter(“Time”,”8.00”)
Delete sheet
DataTable. Deletesheet(“Mysheet”)
SheetID : Index value begin’s with 1
Export file
DataTable.export(“FileName”)
Export sheet
DataTable.exportsheet(“FileName”,SheetID)
FileName: String location
SheetID: Index values begin with 1
Subscribe to:
Posts (Atom)