Field-Map Scripting

4.6.5.3 ClearSheet

ClearSheet procedure


Prototype:

procedure ClearSheet(const SheetName :string);  

Description:

Clears all data on the active sheet, but does not delete it.

Syntax:

xls.ClearSheet('MySheet');    


Part

Description


xls

Variable declared as an instance of the TExcelWrapper class

Return value:


none


See also:

AddSheet , MakeSheetActive , ClearSheet , Complex example



Example:

Var
  Row, Rows, Cols:integer;
  xls :TExcelWrapper;
Begin
  {document preparation}
  //...
  {managing worksheets}
  xls.AddSheet('My first sheet',true);
  xls.SetValue(1,1,'My first sheet','ColCaption','','');   
    
  xls.AddSheet('My second sheet',true);
  xls.SetValue(1,1,'My second sheet','ColCaption','','');
    
  xls.AddSheet('My third sheet',true);
  xls.SetValue(1,1,'My third sheet','ColCaption','','');    

  xls.ClearSheet('My first sheet');   xls.ClearSheet    
    
  xls.MakeSheetActive('My second sheet' ); 

  {document saving / previewing}
  //...
End.