Excel Issue :(


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Excel Issue :(

  1. #1
    Join Date
    Nov 2005
    Posts
    6

    Excel Issue :(

    I need to copy data from an excel workbookA to another workbookB .

    WorkbookA has hidden rows . I only need to copy the visible rows from workbookA to workbookB.


    I believe i have to iterate through each row and check for the visible property and then copy. But I am not able to do it .
    I dont see a visible property for a row in excel.

    Any ideas ?

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Excel's macro recorder is your friend. I created some data in a worksheet and hid some rows. Then I started recording a macro. I highlighted my data and selected Edit -> Go To -> Special... -> "Visible Cells Only." I copied the selection and pasted it into another worksheet. Then I stopped recording the macro. Here's what was recorded:
    Code:
    Range("A1:A10").Select
    Selection.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Sheet2").Select
    ActiveSheet.Paste
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 12
    Last Post: 03-09-2010, 09:51 AM
  2. Replies: 0
    Last Post: 03-09-2006, 08:40 PM
  3. Replies: 8
    Last Post: 01-23-2006, 03:27 PM
  4. ANN: Active XL Report 4.1 - Excel reporting with practically no coding
    By Alexander Frolov [Afalina Co., Ltd.] in forum vb.announcements
    Replies: 0
    Last Post: 06-24-2002, 12:13 PM
  5. ANN: Active XL Report 4.0 - Excel reporting with practically no coding
    By Afalina Co., Ltd. in forum vb.announcements
    Replies: 0
    Last Post: 04-01-2002, 09:39 AM

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