def format_excel(writer, df_size):
    """ Add Excel specific formatting to the workbook
    df_size is a tuple representing the size of the dataframe - typically called
    by df.shape -> (20,3)
    """
    # Get the workbook and the summary sheet so we can add the formatting
    workbook = writer.book
    worksheet = writer.sheets['summary']
    # Add currency formatting and apply it
    money_fmt = workbook.add_format({'num_format': 42, 'align': 'center'})
    worksheet.set_column('A:A', 20)
    worksheet.set_column('B:C', 15, money_fmt)
    # Add 1 to row so we can include a total
    # subtract 1 from the column to handle because we don't care about index
    table_end = xl_rowcol_to_cell(df_size[0] + 1, df_size[1] - 1)
    # This assumes we start in the left hand corner
    table_range = 'A1:{}'.format(table_end)
    worksheet.add_table(table_range, {'columns': [{'header': 'account',
                                                   'total_string': 'Total'},
                                                  {'header': 'Total Sales',
                                                   'total_function': 'sum'},
                                                  {'header': 'Average Sales',
                                                   'total_function': 'average'}],
                                      'autofilter': False,
                                      'total_row': True,
                                      'style': 'Table Style Medium 20'})