HotXLS Belgeleri İçindekiler Ana sayfa Genel bakış TGridToXLS IXLSWorkbook Ana sayfa İçindekiler Genel bakış

SaveAs yöntem

Saves the range values in a file or stream. Döndürür 1 if it succeeds

Sözdizimi

function SaveAs(FileName: WideString; FileFormat: TXLSFileFormat): Integer; function SaveAs(Stream: TStream; FileFormat: TXLSFileFormat): 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 FileFormat TXLSFileFormat. A value that indicates format of the file to be saved Stream TStream. Saves to a stream specified in the Stream parameter

Açıklama

FileFormat can be one of these TXLSFileFormat constants xlHTML HTML file format xlCSV Comma separated values file format (CSV) xlText Tab separated values file format (TSV) xlUnicodeCSV Comma separated unicode values file format (CSV) xlUnicodeText Tab separated unicode values file format (TSV)

Örnek

This example saves cells A1:F100 on sheet one to CSV file
Workbook.Sheets[1].Range['A1', 'F100'].SaveAs('expdata.csv', xlCSV); This example saves cells A1:F100 on sheet one to HTML file
Workbook.Sheets[1].Range['A1', 'F100'].SaveAs('expdata.html', xlHTML); This example saves cells A1:F100 on sheet one to TSV (Tab Separated Values) file
Workbook.Sheets[1].Range['A1', 'F100'].SaveAs('expdata.tsv', xlText); This example saves the entire Worksheet as sheet.csv
Workbook.Sheets[1].UsedRange.SaveAs('sheet.csv', xlCSV); This example saves the entire Worksheet as unicode sheet.csv
Workbook.Sheets[1].UsedRange.SaveAs('sheet.csv', xlUnicode CSV); This example saves cells A1:F100 on sheet one to unicode TSV (Tab Separated Values) file
Workbook.Sheets[1].Range['A1', 'F100'].SaveAs('expdata.tsv', xlUnicodeText); Copyright © 2010-2026 losLab Software