TXlsFile.Save Method
Overloads
- TXlsFile.Save(string, TFileFormats, Char, TEncoding)
- TXlsFile.Save(TStream, TFileFormats, Char, TEncoding)
TXlsFile.Save(string, TFileFormats, Char, TEncoding)
Saves the file to a disk.
Syntax
Unit: FlexCel.XlsAdapter
procedure TXlsFile.Save(const fileName: string; const fileFormat: TFileFormats; const delimiter: Char; const fileEncoding: TEncoding); overload; override;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | fileName | string | File to save. If TExcelFile.AllowOverwritingFiles is false, then fileName MUST NOT exist. |
const | fileFormat | TFileFormats | File format. Automatic will try to guess it from the filename, if present. |
const | delimiter | Char | Delimiter to use if FileFormat is TFileFormats.Text |
const | fileEncoding | TEncoding | Encoding for the generated file, when writing a Text-delimited file (csv or txt). This parameter has no effect on xls/x files. If omitted, TUTF8EncodingNoBom.Instance will be used. Note that to create a file with BOM (byte order marker) you need to specify an encoding here, the same as you do with a StreamWriter. |
See also
TXlsFile.Save(TStream, TFileFormats, Char, TEncoding)
Saves the file to a stream.
Syntax
Unit: FlexCel.XlsAdapter
procedure TXlsFile.Save(const aStream: TStream; const fileFormat: TFileFormats; const delimiter: Char; const fileEncoding: TEncoding); overload; override;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | aStream | TStream | Stream where to save the file. Must be a seekable stream. |
const | fileFormat | TFileFormats | File format. Automatic will try to guess it from the filename, if present. |
const | delimiter | Char | Delimiter to use if FileFormat is TFileFormats.Text |
const | fileEncoding | TEncoding | Encoding for the generated file, when writing a Text-delimited file (csv or txt). This parameter has no effect on xls files. If omitted, TUTF8EncodingNoBom.Instance will be used. Note that to create a file with BOM (byte order marker) you need to specify an encoding here, the same as you do with a StreamWriter. |