Number of rows in xls file

  • Thread starter Thread starter Gerry Metze
  • Start date Start date
G

Gerry Metze

I'm trying to automate processing of an .xls file. Are
there variables/parameters/whatever I can read that tell
me how many rows and columns there are in the .xls file?
The file has several blank lines interspersed, so looking
for blank lines isn't enough.
 
Hi Gerry

Am I correct that you want to know how many rows have data on you sheet?
Or do you want to know the last used row/column on your sheet
 
Hi Ron --

Yes; I can't look for empty rows to stop a reading loop
because there are embedded empty rows in the file.

I want to read the data into a VB array for further
processing.

Thanks,
Gerry

-----Original Message-----
Hi Gerry

Am I correct that you want to know how many rows have data on you sheet?
Or do you want to know the last used row/column on your sheet

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)




"Gerry Metze" <[email protected]>
wrote in message [email protected]...
 
Thanks a lot, Bill! It works like a charm. I also used
c = Selection.Column to read just the cells that were
filled. A lot better than filling a 65536x256 array with
mostly empty cells.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top