DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Delete rows in Excel sheet

  1. #1
    Dishna Guest

    Delete rows in Excel sheet


    Hello,
    I am opening an Excel sheet with the following code. I want to delete
    first four rows in this. Please help me to do that.

    Set xlApp = CreateObject("excel.application")
    Set xlw = xlApp.Workbooks.Open(sFileName)
    Set xls = xlw.Sheets(1)
    Thank you very much in advance.

    Dishna


  2. #2
    Paul Clement Guest

    Re: Delete rows in Excel sheet

    On 4 Sep 2001 11:33:51 -0700, "Dishna" <dishna@address.com> wrote:


    Hello,
    I am opening an Excel sheet with the following code. I want to delete
    first four rows in this. Please help me to do that.

    Set xlApp = CreateObject("excel.application")
    Set xlw = xlApp.Workbooks.Open(sFileName)
    Set xls = xlw.Sheets(1)

    xls.Range("1:4").Delete Shift:=xlUp


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center