pyexcel.save_as

pyexcel.save_as(**keywords)[source]

Save a sheet from a data srouce to another one

Parameters:
  • dest_file_name – another file name. out_file is deprecated though is still accepted.
  • dest_file_type – this is needed if you want to save to memory
  • dest_session – the target database session
  • dest_table – the target destination table
  • dest_model – the target django model
  • dest_mapdict – a mapping dictionary, see save_to_memory()
  • dest_initializer – a custom initializer function for table or model
  • dest_mapdict – nominate headers
  • dest_batch_size – object creation batch size. Django specific
  • keywords – additional keywords can be found at pyexcel.get_sheet()
Returns:

IO stream if saving to memory. None otherwise

Saving to source parameters
file dest_file_name, dest_sheet_name, keywords with prefix ‘dest’
memory dest_file_type, dest_content, dest_sheet_name, keywords with prefix ‘dest’
sql dest_session, table, dest_initializer, dest_mapdict
django model dest_model, dest_initializer, dest_mapdict, dest_batch_size