View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Santhosh Pasupuleti Santhosh Pasupuleti is offline
external usenet poster
 
Posts: 1
Default Clearing Row data for a given range

Hi,

I am trying to clear the row data keeping formatting in tact and
unfortunately the code below doesnt work. I tried using Clear contents
menthod as well as clear notes and it is of no use. Can anyone please tell me
how to delete the data keeping row formatting in tact?


ws.Rows.get_Range("A1", "Z" +
(dss.Tables[0].Rows.Count).ToString()).ClearContents();
or

Excel.Range rj;

rj = ws.Rows.get_Range("A1", "Z" +
(dss.Tables[0].Rows.Count).ToString());
rj.ClearContents();

Thanks and Regards,
Santhosh Kumar.P