Hi there,
I am writing a guide to document some of the more common commands I use with pyexcel.
For ordering sheets alphabetically I wrote this using some clues from documentation:
def order_sheets_alphabetically(
file_path,
dest_file_path,
reverse=False
):
book = pyexcel.get_book(file_name=file_path)
sheet_names = book.sheet_names()
sheet_names.sort(reverse=reverse)
data = OrderedDict()
for sheet_name in sheet_names:
data.update({sheet_name: book[sheet_name]})
return pyexcel.save_book_as(
bookdict=data, dest_file_name=dest_file_path)
Is this the best way of doing so?
Hi there,
I am writing a guide to document some of the more common commands I use with pyexcel.
For ordering sheets alphabetically I wrote this using some clues from documentation:
Is this the best way of doing so?