Hello and greetings.
I hope this will be a simple question for most but is causing me grief.
I am trying to find out the number of rows in an Excel spreadsheet.
I am using vb.net. The code compiles beautifully but everytime I run the program it returns the row number to be 1. I know there are more than 1 rows on this spreadsheet. What am I doing wrong.
Here is part of my code
msgbox (ws.UsedRange.Rows.Count) just so I see how many rows are returned
For i = 1 to ws.UsedRange.Rows.Count
then I loop through the rows to get a specific column
next i
Thanks
mjay
I hope this will be a simple question for most but is causing me grief.
I am trying to find out the number of rows in an Excel spreadsheet.
I am using vb.net. The code compiles beautifully but everytime I run the program it returns the row number to be 1. I know there are more than 1 rows on this spreadsheet. What am I doing wrong.
Here is part of my code
msgbox (ws.UsedRange.Rows.Count) just so I see how many rows are returned
For i = 1 to ws.UsedRange.Rows.Count
then I loop through the rows to get a specific column
next i
Thanks
mjay