name and row count of excel files in a directory

Author Message
johnrobert

  • Total Posts : 5
  • Scores: 0
  • Reward points : 0
  • Joined: 10/3/2011
  • Status: offline
name and row count of excel files in a directory Monday, October 24, 2011 2:36 AM (permalink)
0
I have a set of excel files in a directory, is it possible to print every file name and the number of rows in each file through a vb script? if yes, could some one please help me.

**************
Com_Init()
Loop, D:\Excel-tep\Efiles\*.xls
{
   xlBook := Com_GetObject(A_LoopFileFullPath)
   xlRng := Com_Invoke(xlBook, "ActiveSheet.UsedRange")
   records := Com_Invoke(xlRng, "Rows[1].Row") + Com_Invoke(xlRng, "Rows.Count") - 1
   t .= A_LoopFileName " (" records " Lines)`n"
   Com_Release(xlBook), Com_Release(xlRng)
}
Com_Term()
 ****************
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9