WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with Excel
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Row Count

 Keywords: Row Count Total Non Empty Rows 

objxl = ObjectCreate("Excel.Application")
objxl.visible = @FALSE
objwbks = objxl.workbooks

excelfile = "C:\Temp\Data\warrentya.xls"
objwbks.open (excelfile)

objawb = objxl.activeworkbook
objsheet = objawb.worksheets(1)
rowcount = objsheet.UsedRange.Rows(objsheet.UsedRange.Rows.Count).Row
Message('RowCount',rowcount)

objawb.Save
objawb.Close()
objXL.quit

objsheet =0
objawb =0
objwbks =0
objxl =0
Exit

Article ID:   W18113
Filename:   Row Count.txt
File Created: 2008:04:28:11:50:06
Last Updated: 2008:04:28:11:50:06