Documentazione HotXLS

Save metodo

Saves changes to the Workbook. Restituisce 1 if it succeeds

Sintassi

funzione Save: Integer;

Esempio

This example creates a new Workbook with one Worksheet e then saves the Workbook

Var
  Workbook: IXLSWorkbook;
begin
  Workbook := TXLSWorkbook.Create; {create new Workbook}
  Workbook.Worksheets.Add;
  Workbook.SaveAs('book.xls');
  Workbook.Sheets[1].Name := 'NewName';
  Workbook.Save; //save to book.xls
end;
This example opens book.xls, changes the name of sheet one e then saves the Workbook to the same file

Var
  Workbook: IXLSWorkbook;
begin
  Workbook := TXLSWorkbook.Create;
  Workbook.Open('book.xls');
  Workbook.Sheets[1].Name := 'NewName';
  Workbook.Save; //save to book.xls
end;