Hi,
you can get the # of clumns/rows filled in a worksheet by the property UsedRange; see this previous post:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=50650000000500000060D70000&HTHREAD=000055136&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Good luck,
Alberto