XlsFile.Save Method
Overloads
- XlsFile.Save(String, TFileFormats, Char, Encoding)
- XlsFile.Save(Stream, TFileFormats, Char, Encoding)
XlsFile.Save(String, TFileFormats, Char, Encoding)
Saves the file to a disk.
Syntax
Namespace: FlexCel.XlsAdapter
public override void Save(String fileName, TFileFormats fileFormat, Char delimiter, Encoding fileEncoding)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
fileName | String | File to save. If ExcelFile.AllowOverwritingFiles is false, then fileName MUST NOT exist. | |
fileFormat | TFileFormats | File format. Automatic will try to guess it from the filename, if present. | |
delimiter | Char | Delimiter to use if FileFormat is TFileFormats.Text | |
fileEncoding | Encoding | 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, new UTF8Encoding(false) 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
XlsFile.Save(Stream, TFileFormats, Char, Encoding)
Saves the file to a stream.
Syntax
Namespace: FlexCel.XlsAdapter
public override void Save(Stream aStream, TFileFormats fileFormat, Char delimiter, Encoding fileEncoding)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
aStream | Stream | Stream where to save the file. Must be a seekable stream. | |
fileFormat | TFileFormats | File format. Automatic will try to guess it from the filename, if present. | |
delimiter | Char | Delimiter to use if FileFormat is TFileFormats.Text | |
fileEncoding | Encoding | Encoding for the generated file, when writing a Text-delimited file (csv or txt). This parameter has no effect on xls files. If omitted, new UTF8Encoding(false) 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. |