excel - outlines

M

meghnal

Hi,
I have to copy data from one excel file to another. I am using the following
command to copy

ws2.get_Range("A1", "D5").Copy(ws1.get_Range("A5","D10"));

ws1 and ws2 are Worksheets. When I copy like this, the rows/cols which were
grouped in ws2 dont appear as group in ws1. Is there any way we can restore
this information.

Thanks in advance
Meghna
 
J

Jacob Skaria

Outline is a applicable to a row and not to a cell. Try and copy the rows
instead.

If this post helps click Yes
 
M

meghnal

Hi,
Thanks a lot for your reply. Can you please tell me is there any way to read
a complete row/column using microsoft office interop excel.

Thanks
Meghna
 
J

Jacob Skaria

Try the below

ws2.Rows("5:9").Copy ws1.Rows(5)

OR

ws2.Rows("5:9").Copy ws1.Rows(5:9)

If this post helps click Yes
 
M

meghnal

Thanks a lot for reply...I think I dint put my question in correct way. I
want to copy not only the data but outline structure as well i.e expand and
collapse buttons should alsp occur in the worksheet ws1.

Thanks
Meghna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top