<s> from datetime import datetime <EOL> import xlsxwriter <EOL> workbook = xlsxwriter . Workbook ( '<STR_LIT>' ) <EOL> worksheet = workbook . add_worksheet ( ) <EOL> bold = workbook . add_format ( { '<STR_LIT>' : <NUM_LIT:1> } ) <EOL> money_format = workbook . add_format ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> date_format = workbook . add_format ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> worksheet . set_column ( <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:15> ) <EOL> worksheet . write ( '<STR_LIT>' , '<STR_LIT>' , bold ) <EOL> worksheet . write ( '<STR_LIT>' , '<STR_LIT>' , bold ) <EOL> worksheet . write ( '<STR_LIT>' , '<STR_LIT>' , bold ) <EOL> expenses = ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:1000> ] , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:100> ] , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT> ] , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , <NUM_LIT:50> ] , <EOL> ) <EOL> row = <NUM_LIT:1> <EOL> col = <NUM_LIT:0> <EOL> for item , date_str , cost in ( expenses ) : <EOL> date = datetime . strptime ( date_str , "<STR_LIT>" ) <EOL> worksheet . write_string ( row , col , item ) <EOL> worksheet . write_datetime ( row , col + <NUM_LIT:1> , date , date_format ) <EOL> worksheet . write_number ( row , col + <NUM_LIT:2> , cost , money_format ) <EOL> row += <NUM_LIT:1> <EOL> worksheet . write ( row , <NUM_LIT:0> , '<STR_LIT>' , bold ) <EOL> worksheet . write ( row , <NUM_LIT:2> , '<STR_LIT>' , money_format ) <EOL> workbook . close ( ) </s>
