pyexcel.Book.save_as¶
-
Book.
save_as
(filename, **keywords)¶ Save the content to a new file
Keywords may vary depending on your file type, because the associated file type employs different library.
PARAMETERS
filename: a file path
- library:
- choose a specific pyexcel-io plugin for writing
- renderer_library:
- choose a pyexcel parser plugin for writing
Parameters related to csv file format
for csv, fmtparams are accepted
- delimiter :
- field separator
- lineterminator :
- line terminator
- encoding:
- csv specific. Specify the file encoding the csv file. For example: encoding=’latin1’. Especially, encoding=’utf-8-sig’ would add utf 8 bom header if used in renderer, or would parse a csv with utf brom header used in parser.
- escapechar :
- A one-character string used by the writer to escape the delimiter if quoting is set to QUOTE_NONE and the quotechar if doublequote is False.
- quotechar :
- A one-character string used to quote fields containing special characters, such as the delimiter or quotechar, or which contain new-line characters. It defaults to ‘”’
- quoting :
- Controls when quotes should be generated by the writer and recognised by the reader. It can take on any of the QUOTE_* constants (see section Module Contents) and defaults to QUOTE_MINIMAL.
- skipinitialspace :
- When True, whitespace immediately following the delimiter is ignored. The default is False.
- pep_0515_off :
- When True in python version 3.6, PEP-0515 is turned on. The default is False