I had the need to find the amount of used rows or records in an excel spread sheet. The following c
I had the need to find the amount of used rows or records in an excel spread sheet. The following code will give you a good record count out
API Declarations
Dim wks As Excel.Worksheet
dim xlsWorkSheet as string
dim xlsCount as string
Rate I had the need to find the amount of used rows or records in an excel spread sheet. The following c
(1(1 Vote))
xlsWorkSheet = wkb.Worksheets(1).Name ' Gives name of first worksheet.
Set wks = wkb.Worksheets.Item(1) ' Set up the worksheet
wks.UsedRange.Select ' Grab all used rows
xlsCount = Selection.Rows.Count ' Count the used rows
wkb.Close True, File1 ' Close the file when your done.
I had the need to find the amount of used rows or records in an excel spread sheet. The following c Comments
No comments yet — be the first to post one!
Post a Comment