View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default delete data in an execl from c++

how can i delete data in an excel from c++ ?
i've tried excel_file_name.clean() but it's not working.
thanks in advance .


Either of methods Clear OR ClearContents

Ref a Range on a specific sheet...
appXL.ActiveWorkbook.Sheets(#).Range("A1:D11").Cle ar
appXL.ActiveWorkbook.Sheets(#).Range("A1:D11").Cle arContents

OR Ref a sheet...
appXL.ActiveWorkbook.Sheets(#).Cells.Clear
appXL.ActiveWorkbook.Sheets(#).Cells.ClearContents

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion