Páginas

martes, 12 de agosto de 2014

Python: Cambiando el formato de fecha en una celda usando Openpyxl


Ha sido tan falcil como crear el objecto celda y aplicar la propiedad .number_format = "dd-mm-yyy" o como quieras.

#pega la fecha del contrato
 billingReportSheet.cell(row=n, column=3).value = contractsReport.sheet_by_index(0).cell_value(statRow,15)

#si es una fecha, se copiará como "4562763"

#cambia el formato
billingReportSheet.cell(row=n, column=3).number_format = "dd-mm-yyyy"

1 comentario:

  1. Mysuru Casino - The HERZAMMAN
    Mysuru Casino https://tricktactoe.com/ - The septcasino Home of the Best of the Slots! Visit us goyangfc to Play the best slots and herzamanindir enjoy the best table microtouch solo titanium games in our casino. Visit us

    ResponderEliminar