Friday 6 April 2012

To get data from particular sheet


Set obj=createobject("excel.application")
Set bk=obj.workbooks.open("E:\sac1.xls")
Set sh1=bk.worksheets(1)
rc=sh1.usedrange.rows.count
cc=sh1.usedrange.columns.count
For i=1 to rc
For j=1 to cc
rs=sh1.usedrange.cells(i,j)
print rs
Next

Next

No comments:

Post a Comment