Results 1 to 2 of 2

Thread: [2005:Win App] Finding the last line of an Excel file

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    283

    [2005:Win App] Finding the last line of an Excel file

    I am trying to find the last line of an existing Excel file from Vb.net. I figured out how to open the file. The file has contents in its first columns as follows:

    FRPN

    1997
    1
    2
    3
    4
    5
    .
    .
    50

    I need to find the cell where the integers ended, i.e. the first empty row after the last integer. Can anyone help.

    Thanks

  2. #2
    Addicted Member AnthonyGrimes's Avatar
    Join Date
    Sep 2008
    Location
    United States
    Posts
    131

    Re: [2005:Win App] Finding the last line of an Excel file

    I believe it is something like the following:
    Code:
    LastRow = ObjWorksheet.UsedRange.Rows(ObjWorksheet.UsedRange.Rows.Count).Row
    ObjWorksheet As Excel.Worksheet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width