1.AddSheet:-It is used for adding a new sheet to runtime datatable.
Syntax:-DataTable.AddSheet("Sheetname")
Example:-DataTable.AddSheet("laxmi")
2.DeleteSheet:-It is used for deleting a specified sheet from runtime datatable.
Syntax:-DataTable.DeleteSheet("Sheetname")
Example:-DataTable.DeleteSheet("laxmi")
3.Import:-It is used for importing all the sheets from Excel sheet to runtime datatable.
Syntax:-DataTable.Import"Path of Excel sheet"
Example:-DataTable.Import"d:\excel1.xls"
4.ImportSheet:-It is used for importing a specified sheet from Excel sheet to runtime datatable.
Syntax:-DataTable.ImportSheet"Path of Excel Sheet",Source sheetid,Destination sheetid
Example:-DataTable.ImportSheet"d:\excel2.xls",1,1
Here Source and Destination Sheet ids are 1(in this example)
1 is for Global Sheet.
5.Export:-It is used for exporting a complete runtime datatable(all sheets) to a specified location(path).
Syntax:-DataTable.Export"Path where excel sheet has to be created"
Example:-DataTable.Export"d:\excel3.xls"
6.ExportSheet:-It is used for exporting a specified sheet from a runtime datatable to specified location.
Syntax:-DataTable.ExportSheet"Path of Excel Sheet",Sheet id which has to be exported.
Example:-DataTable.ExportSheet"d:\excel4.xls",1
Datatable Methods(2)
DataTable Methods(1)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment