HotXLS-dokumentaatio Sisältö Etusivu Yleiskatsaus TGridToXLS IXLSWorkbook Etusivu Sisältö Yleiskatsaus

SaveDBGridAs metodi

Creates a new Workbook. Exports DBGrid to Worksheet. Saves the Workbook to the specified file. Palauttaa 1 if it succeeds

Syntaksi

function SaveDBGridAs( Filename: WideString): Integer; FileName WideString. A string that indicates the name of the file to be saved. You can include a full path; if you don't, component saves the file in the current folder

Esimerkki

This example exports the DBGrid1 into Orders.xls Workbook and Orders.html file
begin GridToXLS1.Workbook := nil; //Clears Workbook GridToXLS1.WorksheetName := 'Orders sheet'; //Määrittää name for new Worksheet GridToXLS1.DBGrid := DBGrid1; //Määrittää the dbgrid for export GridToXLS1.SaveDBGridAs('Orders.xls'); //Saves the dbgrid into Orders.xls GridToXLS1.SaveDBGridAs('Orders.html'); //Saves the dbgrid into Orders.html end; Copyright © 2010-2026 losLab Software