Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

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 ?
[377 byte] By [neela] at [2007-11-11 10:19:50]
# 1 Re: Excel Issue :(
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:

Range("A1:A10").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Phil Weber at 2007-11-11 17:22:52 >